Streamlit File Uploader not working within Hugging Face Space

Hi everyone,

I’m using a Hugging Face Docker Space built mainly with Streamlit components. Most components work, but the

file_uploader

isn’t functioning. It appears, but dropping a file doesn’t trigger any action—no errors or log messages. It was working before with Streamlit SDK Spaces. Has anyone else faced this issue or have suggestions?

Thanks

1 Like

Perhaps this case?

Unfortunately, as you said, we have to set --server.enableXsrfProtection=false when using Streamlit on the HF Spaces due to its design.
Actually the official non-Docker Streamlit SDK also disables the XSRF protection on the Spaces for this reason.