Skip to main content

Custom component to perform chunked upload in Streamlit. Based on streamlit-chunked-upload by Ryuya Matsumoto.

Project description

streamlit-chunked-upload

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-chunked-upload

Usage instructions

import streamlit as st
from streamlit_chunked_upload 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_chunked_upload-0.1.dev1.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_chunked_upload-0.1.dev1-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

Details for the file streamlit_chunked_upload-0.1.dev1.tar.gz.

File metadata

File hashes

Hashes for streamlit_chunked_upload-0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 8b746a0c3f9f6f2d6ec25d8cc8c2eae16efe8f80a7c7d4f7a09b8f28602ca33b
MD5 8096c0eb1d156c7d321e63b507ae3b9b
BLAKE2b-256 87c0c0306398769319b690c57c5ae015e8a07b1e25f8cbfeadb134da657224ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_chunked_upload-0.1.dev1.tar.gz:

Publisher: publish.yml on mirzaahmergull/streamlit-chunked-upload

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file streamlit_chunked_upload-0.1.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_chunked_upload-0.1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 5716a7365239ed0a3a080fe63e755f469f1e10dff33aecc0ddc52d6a4fb5afd7
MD5 1d1a43efaa58affc8f72bebf32c41622
BLAKE2b-256 6f1d083935fd1ef1795baea4382c83f73e893ce78364a51efc957b343b40cda2

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_chunked_upload-0.1.dev1-py3-none-any.whl:

Publisher: publish.yml on mirzaahmergull/streamlit-chunked-upload

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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