Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit-chunk-file-uploader-0.0.5.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file streamlit-chunk-file-uploader-0.0.5.tar.gz.

File metadata

File hashes

Hashes for streamlit-chunk-file-uploader-0.0.5.tar.gz
Algorithm Hash digest
SHA256 0ba359388cc011f7404c1d54cd2fd34fdf9318e207941212e64ebe49a3f7228c
MD5 c35188730b4c655596da8dc5b22d7789
BLAKE2b-256 aad1d50ad8abf8e0e9fb8c4cb9de7213c2f04eece6b683a3995de6fc9c180862

See more details on using hashes here.

File details

Details for the file streamlit_chunk_file_uploader-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_chunk_file_uploader-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4bd24055354c6dddc2d6ed996f4b2b8de5f8081e2955cb3d1a4f7d33fb2908fa
MD5 21fea88ed3a8aaecfebb04a97beb8be1
BLAKE2b-256 c1f29e9e674b66656c9ed9f3233afbd4e918317a918590be3cc9135457ea0f5f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page