Network error when uploading files larger than 100mb

Hi community!

I’m writing a streamlit app and using the st.file_uploader() to upload video files (mp4 or mpeg). When I try to upload files larger than 100mb, I get a network error. This happens both when the app is run locally and when it’s run remotely.
I already tried to increase the maxUploadSize, that didn’t change the behavior.

I have 2 questions:

  • Does anyone have an idea how I could fix the issue?
  • How can I have a deeper look into the error? Are there logs etc?

Here’s a minimal example of an app producing the network error when trying to upload files larger than 100mb:

import streamlit as st

st.title("A toy app to test things")
st.write("Upload your video")

file_buffer = st.file_uploader("Upload a video", type=["mp4", "mpeg"])

EDIT: Adding screenshot of the error:

Hi @evah, welcome to the community!

I don’t know for certain, but your issue sounds suspiciously like this GitHub issue:

What use case are you solving for with the file uploader?

Hi Randy, thanks for getting back to me.

About the use case: The scenario is about a user that wants to process and visualize data that they have on their local machine. Hence the upload. After that, the video is processed by a neural net and the results are provided for download and visualized.

For video files, such a limitation (100MB in my case, 50MB in the issue you linked), is quite bothersome because the files are pretty large.
I’m not sure if the linked issue is the same problem though.

That use case certainly makes sense. Is your app something you could share the source code for helping us debug what the issue might be?

I’m afraid I can’t share the code for the app. However the error also occurs with the minimal example code I posted in the original post

i have the same problem, i can’t upload file larger than 100mb and got this kind of error. i already use server.maxUploadSize but still got this error. Does anyone know how to fix this error?

here’s the code when i got the error (for testing stuff):

import streamlit as st
uploaded_files = st.file_uploader('Choose your video', type="MP4")
if uploaded_files is not None:
    video_bytes =

Hi @bruhtus, welcome to the Streamlit community!

I spoke with one of our internal engineers, and they suggested first to check the version number of Streamlit you are using. In version 0.57.0, the limit was raised to 200MB and some of the logic was also changed. The current version of Streamlit is 0.59.0, so if you can first upgrade to see if that fixes the problem, that would be great.

If not, let me know and we’ll figure out something else to try.

(cc: @evah since it’s the same problem and potential solution)

unfortunately my streamlit version already 0.59.0, i already tried to re-install streamlit but still got an error. i tried to upload file more than 200mb (without server.maxUploadSize) and got different warning (a normal one i guess). the warning i got from uploading file between 100mb - 200mb and larger than 200mb is quite different (without server.maxUploadSize), if using server.maxUploadSize i only got the error 400

Hi @bruhtus and @evah, thanks for your patience. I generated some test video files today along with a clean Streamlit environment with 0.60 on Ubuntu 18.04 and I can confirm the behavior you are seeing. I will send a note to our engineers and see if they can identify what the issue is.

GitHub issue:

Thanks for the update!

1 Like

Hi @evah @bruhtus, we have just released a fix for this in 0.62. Please upgrade and take a look. If you are still encountering any issues, please let us know.

1 Like

I’ve just got this error running the script from Windows Server. Streamlit 0.63.1 is installed. Have no idea why the file size is limited to 200MB. On Mac everything works just fine

Hi @jamie, just wanted to clarify, are you getting an error when uploading a file larger than 200MB or larger than 100MB? 200MB is our default upload size limit that can be updated using the server.maxUploadSize configuration option.

Hi @karriebear, thanks for your reply. Yes, I am setting the server.maxUploadSize to 1024. Still, the error appears when I try to upload files with sizes greater than 200 MB

That’s interesting. Could you share which error you are receiving?

Also could you try running streamlit config show and confirm that the configuration option maxUploadSize has been set to 1024? We have several manners to read in configuration options and perhaps it may be overwritten somewhere?