Where are saved files?

To answer the general question, the files will be written in the current work directory, which for Streamlit sharing is the top-level if I’m not mistaken.

But specifically for Streamlit sharing, this isn’t a good development pattern. Apps are deployed in containers, which may restart at any time or may have multiple replicas to serve higher volume of traffic. In that case, your files will only be local to the container where they were written.

It looks like you’re collecting data from users…with Streamlit sharing now supporting secrets management, a better pattern would be to write the data to a persistent location such as Google Drive or Amazon S3, so that these files will persist beyond any specific container on Streamlit sharing.

Best,
Randy

1 Like