Issue with file_uploader and streamlit version 0.84.0

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:
Start
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.
V_0.82.0_expected
With version 0.84.0 only the interactive list below the widget shows both files. The written file_lst shows only test1.txt.
V_0.84.0_unexpected
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!

Here is the bug report:

2 Likes

@thiago thank you for your quick response and the creation of the bug report. :blush:

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.

1 Like

@vdonato thank you for the information and for fixing this. :blush:

Hi @Julius This change has been included in the latest release of 0.84.2. Let us know if any issues arise. Thank you for your patience and support!

2 Likes

Hi @kmcgrady thank you for the info and the quick update. Now it is working as expected. Thanks a lot for your help.