v0.0.3
Bug Fixes
- Storage: Fixed DB connection leaks on exception via
try/finally - Storage: Atomized offset update with a single SQL statement — prevents race condition under concurrent requests
- Storage: Added per-upload file lock (
threading.Lock+fcntl.flock) — safe chunk writes in multi-threaded and multi-process environments - Client: Fixed missing
URLErrorhandling (timeouts, connection drops) in all network calls - Client: Added
timeoutparameter to allurlopen()calls (default 30s) - Client: On
409 Conflict, client now re-syncs offset via HEAD request before retrying the chunk - Uploader:
stop_atis now clamped to file size automatically - Fingerprint: Replaced MD5 with SHA-256 for full-file hashing — fixes incorrect fingerprint when files differ only after the first 64 KB
- URL Storage: Added
threading.Locktoset_url()/remove_url()— prevents URL entry loss under concurrent access - Server: Strengthened request validation
Upload-Metadatalarger than 4 KB returns400(DoS protection)- Invalid base64 in metadata returns
400 - Negative
Content-Lengthreturns400 - Socket timeout applied in
TusHTTPRequestHandler(Slowloris protection, default 30s) - Fixed concurrency bug in expired upload cleanup scheduler
New Features
- Uploader: Added
stop_eventparameter — pass athreading.Eventto cancel an upload cleanly from another thread - Server: Added TUS extensions: expiration, creation-with-upload
- Examples: Configurable port for server examples
Documentation
- Built a documentation site with MkDocs (Material theme) → https://sts07142.github.io/resumable-upload/
- Sections: Advanced Usage, Web Frameworks, API Reference, TUS Compliance
- Updated TUS protocol compliance document
- Synced Korean README with English
⚠️ Breaking Change
The fingerprint algorithm has changed from MD5 to SHA-256. Any upload URLs previously saved in .tus_urls.json (when using store_url=True) will no longer match and must be re-uploaded. Delete the file to start fresh.
Full Changelog: v0.0.2...v0.0.3