modufolio / tus-psr7
TUS (Tus Resumable Upload Protocol) server implementation for PHP
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/modufolio/tus-psr7
Requires
- php: ^8.2
- ext-fileinfo: *
- modufolio/http: dev-main
- psr/http-message: ^2.0
Requires (Dev)
- phpunit/phpunit: ^12
This package is not auto-updated.
Last update: 2026-01-26 20:56:05 UTC
README
A PHP implementation of the TUS resumable upload protocol.
Installation
composer require modufolio/tus-psr7
Requirements
- PHP 8.2 or higher
- PSR-7 HTTP Message implementation
Usage
use Modufolio\Tus\Tus\TusServer; $uploadDir = '/path/to/uploads'; $maxSize = 1024 * 1024 * 100; // 100MB $chunkSize = 1024 * 1024 * 5; // 5MB $server = new TusServer($uploadDir, $maxSize, $chunkSize); // Handle the request $response = $server->handle($request);
Features
- TUS protocol v1.0.0 compliant
- Resumable file uploads
- Checksum verification support (md5, sha1, sha256, sha512)
- Configurable storage backends
- MIME type validation
- Automatic cleanup of expired uploads
License
MIT