Summary
Hi
I try to upload file in replit.com with streamlit. However after upload the file, it reply the * AxiosError: Request failed with status code 403
Is there anyone have the same issue?
Thank you so much for your help.
Code snippet:
import streamlit as st
uploaded_files = st.file_uploader("Choose a CSV file", accept_multiple_files=True)
for uploaded_file in uploaded_files:
bytes_data = uploaded_file.read()
st.write("filename:", uploaded_file.name)
st.write(bytes_data)
1 Like
I am having the same problem. my code was working until yesterday but not working after upgrading to the latest version…
Hey guys, Iam having the same issue, just after upgrade to streamlit 1.20
I’m getting the same error while trying to upload csv files…
Same error for me when uploading a large CSV
clearing browser history and cookies fixed the issue for me.
I figure out how fix this problem. The problem appear when you are using a different domain from Heroku or other cloud service and you are masking it with your domain.
To solve this you can change App url or disable CORS and XSRF on Heroku. This last option is easy, just add this code on your setup.sh:
mkdir -p ~/.streamlit/
echo "\
[server]\n\
headless = true\n\
port = $PORT\n\
enableXsrfProtection=false\n\
enableCORS = false\n\
\n\
" > ~/.streamlit/config.toml
Please, think about the new risk you are opening up in you app if you disable CORS and XSRF.
Did someone fixed it on replit?
pip install streamlit==1.24.0 . Use this earlier version. It fixed the problem for me
1 Like
Hey,
We still face this issue with 1.24.1