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-1.0.2.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-1.0.2-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

Details for the file streamlit_chunked_upload-1.0.2.tar.gz.

File metadata

  • Download URL: streamlit_chunked_upload-1.0.2.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for streamlit_chunked_upload-1.0.2.tar.gz
Algorithm Hash digest
SHA256 71495bfbc6e5148925d1450989607f911488ff321c39db08be8388fb38a80c7e
MD5 fd1daed5f355f2718376edd986c96fa7
BLAKE2b-256 5d8248fcbb3194b1336184cf2bdd6db4452c3d62b445a4f4aaf25a04761bec8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_chunked_upload-1.0.2.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-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_chunked_upload-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3662e5dcd411e17078f840375ec5a062a80b45de3be35c2dccda951245441bab
MD5 3eec0858f3556ea5506719f52374a2be
BLAKE2b-256 c12f4ccbcd5edce549cfb6abac811eba8d3507cb9b002d880132195f3c946dda

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_chunked_upload-1.0.2-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