The Streamlit app writes uploads to uploaded.mbox, using either the current working directory or a query-param-controlled temp dir. It then reopens that file for message access later. This is brittle and could leave stale files behind between sessions. Using tempfile and cleanup logic would make it more reliable.