Skip to content

Upload files to disk with st.file_uploader #10828

@jrieke

Description

@jrieke

Checklist

  • I have searched the existing issues for similar feature requests.
  • I added a descriptive title and summary to this issue.

Summary

Add a way for st.file_uploader to upload files directly to disk. This should not store the file in memory.

Why?

This is great for large files that don't fit into memory. An alternative is uploading them to S3 or some other external file storage (see #10827).

How?

Maybe add a parameter destination="memory"|"disk". Or we could (additionally?) have a config option that sets the location for all file uploaders. If "disk" is set, st.file_uploader should return the file path of the uploaded file instead of an UploadedFile object.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    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