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)
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: