I am creating a dashboard locally where I want to upload a ~3.5gb video file. With the out-of-the-box st.file_uploader component this results in the streamlit server getting killed.
Looking at the memory usage, at the moment of uploading, streamlit’s memory usage suddenly skyrockets, which results in the server getting killed.
Relevant code:
uploaded_file = st.file_uploader("Choose a video file", type=["mp4", "mov", "avi"])
I’ve tried by using a HTML form created in markdown, but streamlit still keeps the file in memory.
st.markdown("""
<form action="/video/save" method="post" enctype="multipart/form-data">
<input type="file" name="file" required>
<input type="submit" value="Upload">
</form>
""",
unsafe_allow_html=True
)
I start the server with --server.maxUploadSize=5000