Skip to content

FileUploader API enhancements #1202

@tconkling

Description

@tconkling

File Uploader was released but has since accumulated several bugs and feature requests. This project will iterate on the file uploader and address items that were passed over as part of the MVP and items identified by the community.

Changes include the following:

  • Support multiple file uploads. Return a list if multiple files allowed. Otherwise return a singleton.
  • Return a binary buffer with the following attributes
    1. file name
    2. file type
    3. size
  • Update the UX to provide file upload progress and file information
  • Map file extension aliases (i.e. jpg + jpeg, xls + xlsx)
  • Create disabled state
  • Ensure binary buffers are reset to the beginning after being read
  • Add a check to make sure backend and frontend are in sync
  • Optimize caching
  • Bug fixes for mobile support

Nice to haves

  • Allow a max upload size less than 1 MB
  • Keep file display list a constant height so actions within file display does not shift the page up/down (i.e. paginating between pages with 2 vs 3, deleting 5th item)
  • Toggle to show/hide uploaded files for multiple file uploader
  • Make file a link to download/open
  • When in single-file mode, keep the gray box and the "browse" buttons, but then replace everything else with the uploaded file so users can replace a file in one action.

Metadata

Metadata

Assignees

Labels

feature:st.file_uploaderRelated to the `st.file_uploader` widgettype:enhancementRequests for feature enhancements or new features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions