I noticed recently (August?) that I am not able anymore to upload files on my Web App.
It is deployed on Microsoft Azure and it ensures that only people from my organisation have access to it via Azure Active Directory.
Until August 2023, I was using the workaround: enableXsrfProtection = false (which was fine for the uploading).
Hi, I am encountering the same issue as well. Uploading works as long as authentication via Azure Active Directory is turned off. Once it is enabled, I can no longer upload files on my app. The workaround doesn’t work with me either. Thanks for bringing the issue to light!
Can you try using Streamlit v1.26.0? Several bug fixes related to the st.file_uploader were merged recently, so maybe using this latest Streamlit version helps. Let me know!
Thank you both for checking! Just had a better look and this issue is frequently discussed on the forum. (My guess is that an HTTP request is triggered when a user attempts to upload a file, and that request isn’t picking up on the Azure Active Directory authorization headers.)
Not sure if this works, but a user in one thread recommends the following configuration in the .streamlit/config.toml file:
Just want to add that this worked for me on a slightly different problem. I was getting an error when uploading a file on a streamlit embeded with IFRAME and it was all on the local network.
We were facing the same issue today, also on Azure, with Azure AD Authentication enabled.
We’ve upgraded to streamlit 1.26.0 in our requirements.txt.
We’ve disabled XsrfProtection and CORS in our config.toml, which now reads like this (in case the other options are also interesting to anyone?)
Bump, same issue here as well. Followed the creation and two lines to the config.toml, published to Azure Web app, ensured the CORs setting was the same and still having the same problem.