Streamlit space file upload limit (AxiosError 413)

Hi,

I have a space that uses Streamlit to provide a Leaderboard for a benchmark. This requires users to upload a TSV file with their results through Streamlit’s st.file_uploader, which causes some problems. My observation is that if I upload a TSV file > 1MB, I get the error “AxiosError: Request failed with status code 413”.

I found some posts about AxiosError 403 so I tried setting maxUploadSize = 50and enableXsrfProtection = false in .streamlit/config.toml and verifyed their values with:

st.write("XSRF:", st.get_option("server.enableXsrfProtection"))
st.write("Max Upload:", st.get_option("server.maxUploadSize"))

Since this didn’t work and code 413 seems to be more related to the file size, I tried using the package streamlit-chunk-file-uploader to chunk the uploaded files, which didn’t work either. I also couldn’t find the official HF upload limits in the docs. So what are the actual file upload limits and is it possible to increase them?

Thanks for your help!

1 Like