Skip to main content

Custom component to perform chunked upload in Streamlit.

Project description

streamlit-chunk-file-uploader

image
Open in Streamlit

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-1.0.3.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for streamlit-chunk-file-uploader-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e7c9e222346a8c4af20354bd5c8afffc2a0eb30ca0d766e8a6a5b5c4263be77a
MD5 ccfd8e28bbf9f838b8edeb42750f21ef
BLAKE2b-256 a19ecdb24dcc81a32156492488401159cce4510d2f784d1542a2f2769ee49a4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for streamlit_chunk_file_uploader-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0fb512fd8f3a8d55b177b2a5ac2166f8e9c705bf0dff075af4c28adb7356b1a7
MD5 cf8650d9963c00f95646243a60f398e9
BLAKE2b-256 6e779b8cff9293679ba0edd29ea5b547d889298dec0f083f7ef7fafea4289b61

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