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
File details
Details for the file streamlit-chunk-file-uploader-0.0.4.tar.gz
.
File metadata
- Download URL: streamlit-chunk-file-uploader-0.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 | 5b551b4a0903ec76530e1734833d172af5a594af587f8d95d39798f72aeb7045 |
|
MD5 | ca88b2f5a5e8530c98de7066a404710f |
|
BLAKE2b-256 | 74884b4fd326e6f42953b4e0b0558f6874cc89ab167d292e6be176f606abf713 |
File details
Details for the file streamlit_chunk_file_uploader-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: streamlit_chunk_file_uploader-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f5f963750817eb0a06ce719708306efec3dcf220a8c8910db272f70f738d47d |
|
MD5 | 785ef718a69cbcc6ee79ecb44deba831 |
|
BLAKE2b-256 | f8d4da91b14515f5568f87a31f85c3ea5aa1012f18065d27df09c8d8bdc5f53a |