Skip to main content

python wsgi filter for tus protocol 1.0.0

Project description

python wsgi filter for tus protocol 1.0.0, the tus resumable upload standard.

install

pip install tusfilter

Arguments

app

required, the wsgi server application

upload_path

str, required, path of the upload service

tmp_dir

str, optional, directory to store temporary files, default /upload

expire

int, optional, how long before cleanup old uploads in seconds, default 60*60*60

send_file

bool, optional, False for send the absolute filepath in tmp_dir in the request body, True for an actual file uploaded, default False

max_size

int, optional, maximum size of uploads in bytes, default 2**30, 1G

Example

flask

from tusfilter import TusFilter
from flask import Flask

app = Flask(__name__)

@app.route("/upload_resumable/<tmpfile>", methods=['PATCH'])
def upload_resumable(tmpfile):
    # do something else
    return 'End of upload'

app.wsgi_app = TusFilter(
    app.wsgi_app,
    upload_path='/upload_resumable',
    tmp_dir='/tmp/upload',
)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

tusfilter-0.5.1-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tusfilter-0.5.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for tusfilter-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 82908d730fcdd978ad9a12c7b8f4d9cdac1f7e2cee7a339d0f404f8c27811d58
MD5 c5f923a3c6303ef451ff3aa3b1994688
BLAKE2b-256 31f83686a356f687395658bbc0cb62ba1655559426ff68866848e0a173a6e6aa

See more details on using hashes here.

Supported by

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