As a follow up, I wanted to understand how I can delete the files as soon as the processing is complete on those files
Hi @Namya_LG -
It’s important to note that the video files aren’t on “Streamlit’s server” in a normally understood sort of way. Streamlit doesn’t save user files anywhere (as the storage cost to us would be enormous).
file_uploader widget takes the bytes that represent the file from the browser to a Python
BytesIO buffer, which is stored in RAM. When you’re done using those bytes, then can be flushed immediately by deleting the buffer, or upon re-run of the Streamlit app without using
st.cache the buffer will cease to be referenceable from the code.
If there’s something truly sensitive you are doing, I’d suggest either not using a public service like Streamlit sharing.