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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file tuswsgi-0.5.4-py2.py3-none-any.whl
.
File metadata
- Download URL: tuswsgi-0.5.4-py2.py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f681a386254a161a97301a67c01ee7da77419c007d9bc43dbd48d5a987491a5e |
|
MD5 | d9eefd044abe94c0ac5822ac78b96f6c |
|
BLAKE2b-256 | 5a82cdfa7d9b8c90131a7f10e7fd85c6797a6ce36e255f3151b26778a025c386 |