Hi everyone,
I’m new here. First of all thank you really much for your great work in this forum. It helped me out multiple times. But now I encountered an issue where I couldn’t find a thread on, yet.
With the latest version (0.84.0) I’m experiencing a problem with the file_uploader widget.
In the prior version (0.82.0) it was very handy, for my case, to select one file after another and drag&drop it to the widget. With the latest version this doesn’t seems possible anymore. When one or more files were uploaded the next file/s draged and droped to the widget are not accessible, even though these files appear in the interactive list below the widget.
I want to use st.session_state is the app I’m working on and for that reason the version 0.84.0 is necessary to my understanding.
In order for you to reproduce the situation I made up this example:
import streamlit as st
uploaded_files = st.file_uploader('Select files',type=['txt'],accept_multiple_files=True)
file_lst = [uploaded_file.name for uploaded_file in uploaded_files]
st.write(file_lst)
Assuming I want to upload the two files test1.txt and test2.txt one after another. For the first file (test1.txt) the behavior is as expected and equivalent for both versions:
Then later I want to upload another file in this case test2.txt.
The expected behavior can be seen with version 0.82.0. Both files are shown in the interactive list below the widget as well as in the written file_lst.
With version 0.84.0 only the interactive list below the widget shows both files. The written file_lst shows only test1.txt.
Anyone had a similar issue? I apologize, if the solution is obvious, but I got stuck with it and can’t figure out, how to solve the issue.
Hi @Julius, thanks for letting us know! The team is looking into this right now. In the meantime, I created a bug report in Github. Let’s continue the conversation over there!
Thanks again for reporting this @Julius! I figured out the issue and am working on a fix now. The fix should be released in version 0.84.2, which we hope to release by the end of this week.
As a temporary workaround until then, it turns out that uploading files to the file uploader simultaneously (either by dragging and dropping them all at the same time or selecting them all at once from the browse file menu) still works properly.
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.