Safe way to store uploaded data to my google drive?

Hello, thanks for this amazing app! I was able to successfully deploy an app on streamlit cloud. The app asks the user to upload a file and then does some magic with it.

My problem: I need to save that file somewhere. My understand is that I cannot write to the github repo where the app is living. What are the alternatives? Is there a way to use st.file_uploader() and then put the file on my google drive (without storing my password in the app) or perhaps dropbox. Perhaps something even simpler?


Hi @datawhiz,

Yes, you can you the Google Drive Python API to upload files.

Additionally, you can use streamlit secrets to store the API keys and passwords if required.



thanks! super useful. But could you share some example code where you do this when a streamlit st.file_uploader() method is called?