Skip to content

Fileuploader Bug: Other Filetypes visible in File Selection Dialog #6176

@LutzFassl

Description

@LutzFassl

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

Before I was using streamlit 1.17.
There it was working correctly that if I use argument type=["csv"], I did not see any files of other type in the selection window (Windows OS).
Now with streamlit 1.18.1 I can see all files of various filetypes, which seems like a bug to me.
However when I select those, it correctly shows them as "files are not allowed.". But why leading a user to falsely selecting them in the first place? The way that streamlit 1.17 did this was the preferred in my opinion.

Reproducible Code Example

import streamlit as st

uploaded_files = st.file_uploader(f"Upload csv files", type=["csv"], accept_multiple_files=True)

Steps To Reproduce

Use fileuploader with specified file extension (on Windows OS) and see that you can select also other filetypes in the dialog -> Bug!?

Expected Behavior

As stated above it would be good to completely hide files of other file extensions in the dialog window.

Current Behavior

See Summary

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.18.1
  • Python version: 3.9
  • Operating System: Windows Server 2022
  • Browser: Chrome
  • Virtual environment: Conda

Additional Information

image

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

priority:P1High priority - fix within two weeksstatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions