File Uploader: 403 error when embedding streamlit app in iframe

I am trying to embed Streamlit app on my website.
I embedded the app via iframe and it “mostly” works.
The only component that doesn’t work is the file uploader.

When uploading the file I get the following error:
Request failed with status code 403

I got the same error even when creating empty .html locally and embedding localhost link from Streamlit.

Guys, any ideas?

2 Likes

Hi Yaroslav, were you able to solve this? I am facing the same issue

1 Like

Also facing the same issue: but my file uploader works from local. Only getting the error from streamlit cloud host.

2 Likes

Same error here. Is there a way to check the status of Streamlit servers? Are they using GCP?

1 Like

try temporarily disabling XSRF protection by running Streamlit with the --server.enableXsrfProtection flag set to false:

streamlit run my_app.py --server.enableXsrfProtection=false

more info App is not loading when running remotely - Streamlit Docs

1 Like

This works but is there any permanent way?

I have done the same and it works and runs with docker /streamlit
CMD [“streamlit”, “run”, “home.py”,“–server.enableXsrfProtection=false”, “–server.port=7860”]

any alternative fix?

I am hosting on Streamlit, uploading file gives me a error,
can you help me in file structure that should be in Github, my app does a basic file uploading and displaying it as table.

has anyone found a fix ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.