How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

After Upload file stays in RAM

calendar_today July 24, 2026 person @ammaraamer ammaraamer domain streamlit

When building internal tools, especially for heavy tasks like firmware development where users frequently upload massive .zip archives or binary packages, this memory leak behavior with st.file_uploader becomes a massive bottleneck. The core issue is that Streamlit’s backend architecture binds the uploaded file object tightly to the active browser session payload. Even when you use clear_on_submit=True inside an st.form, or try to force garbage collection with gc.collect(), the internal Tornado web server that Streamlit runs on holds onto the memory reference until the websocket connection is

open_in_new Read original post