Save session specific uploaded file

Hi Team,

Thanks for this amazing application, I have been using streamlit in every project now to visualize and share it with others.

I have a use case, and I am not sure how to solve for it. I want to share my app with multiple people, who can have the option to upload a csv file containing multiple user_ids, and for each session, I want to read in the file and show the user_ids as radio button on the sidebar. The user can select any user_id and see the details for that id (which is fetched from locally saved data/ S3).

The problem is whenever the user selects one of the ids from the side bar, the app refreshes and prompts for file upload again. If i use st.cache, then this caches a certain file for all subsequent sessions. I am not able to figure out how to use SessionState for the same.

Any guidance is appreciated.