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”
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.