Custom component to perform chunked upload in Streamlit.
Project description
streamlit-chunk-file-uploader
This is a custom component that allows you to split files and send them from your browser to Streamlit.
Installation instructions
pip install streamlit-chunk-file-uploader
Usage instructions
import streamlit as st
from streamlit_chunk_file_uploader import uploader
file = uploader("uploader", key="chunk_uploader", chunk_size=32)
st.write(file)
if file is not None:
st.download_button(
"download",
data=file,
file_name=file.name,
type="primary",
)
About chunk size
When a file is uploaded, a Python script slices the file at the specified chunk size on the browser side and sends it as multiple files to the backend.
It's important to note that chunk size and request size are different.
If you have a constraint such as client_max_body_size, you should set it to a value slightly smaller than the constraint size, such as 31MB if the constraint size is 32MB.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit-chunk-file-uploader-1.0.4.tar.gz.
File metadata
- Download URL: streamlit-chunk-file-uploader-1.0.4.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db37a13c939539bc7842e501a784d313a88aa0702cf8d853687e058a86ff5092
|
|
| MD5 |
d748485c3daf3a812662e630ee331dd7
|
|
| BLAKE2b-256 |
7517c964e14978f358dc0005f11f8ad5700e88b75ca01291529fdc2bef6df505
|
File details
Details for the file streamlit_chunk_file_uploader-1.0.4-py3-none-any.whl.
File metadata
- Download URL: streamlit_chunk_file_uploader-1.0.4-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d91696dd45fad9cff1a23e7abeca19fde11de76c6e5c0ad674e06d4041d2798
|
|
| MD5 |
ee4ef24b6738d3f1aa032023bdaf40bb
|
|
| BLAKE2b-256 |
fbe2a0f931e9b7158054c09222ca017000c3eba7e3123a9d034458ec8f3ec9e1
|