There was a similar question recently, and I think st.beta_expander is the easiest way to hide the file uploader without having to programmatically play with the rerunning script to see if files were added.
I checked the st.beta_expander() function, but the problem is like you mention it would hide the whole st.file_uploader(). But is there a way for me to only hide the extended section of the file_uploader() only?
@andfanilo I´ll be probably using the st.beta_expander() function for the moment
Maybe in the future you can consider adding a parameter like hide_extended=True in the st.file_uploader() for example to tackle this issue, specially when people use it to load lots of small size documents (i.e +100) and the extended window doesn´t show “Showing page 1 of 33”