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.