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.

Fork of https://github.com/everydo/tusfilter with bugfixes for WebOb Request usage.

install

pip install tuswsgi

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 tuswsgi import TusMiddleware
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 = TusMiddleware(
    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

tuswsgi-0.5.3-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file tuswsgi-0.5.3-py2.py3-none-any.whl.

File metadata

  • Download URL: tuswsgi-0.5.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

File hashes

Hashes for tuswsgi-0.5.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cc42ec231afbd7162783d1518347f446d2999762572896f3a9989954d5ddca95
MD5 10b409e559201ae31d800388fb2e45a0
BLAKE2b-256 0f4bab36c3c8069db4c052a3131175bdc90eed46f2e0b69e2c636f618c642330

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