Download the PHP package solid3d/laravel-tus-s3 without Composer
On this page you can find all versions of the php package solid3d/laravel-tus-s3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-tus-s3
Laravel TUS S3
Tus 1.0 server for Laravel, backed by S3 multipart uploads. Built for stateless web pods: no shared filesystem and no local temp files.
Requires PHP 8.5+ and Laravel 13.
Installation
You can install the package via Composer:
Run the migrations (creates tus_uploads):
Optionally publish the config file:
Point TUS_STORAGE_DISK at an S3-compatible Laravel disk. Object keys are generated server-side under temporary_prefix — clients cannot choose the bucket or key.
| Env | Default | Notes |
|---|---|---|
TUS_STORAGE_DISK |
FILESYSTEM_DISK / s3 |
Disk for temporary objects |
TUS_TEMPORARY_PREFIX |
tus/tmp |
Relative to the disk root |
TUS_UPLOAD_EXPIRATION |
60 |
Minutes |
TUS_PATH |
tus |
Route prefix |
TUS_OWNERSHIP_ENABLED |
true |
Bind authenticated uploads to their creator |
TUS_MIN_PART_SIZE |
5242880 |
S3 non-final part minimum (5 MiB) |
TUS_MAX_PART_BYTES |
5242880 |
Keep Uppy chunkSize ≤ this |
Routes are registered automatically at /tus. Default middleware is web; add auth (or replace the stack) via tus.middleware when anonymous creation should be prohibited.
S3 permissions
s3:CreateMultipartUploads3:UploadParts3:CompleteMultipartUploads3:AbortMultipartUploads3:ListMultipartUploadPartss3:DeleteObjects3:GetObject(finalization streams the temp object)
Scope keys to {disk-root}/tus/tmp/*. Native and scoped S3 disks are supported.
Usage
Uppy
Completed uploads
Listen for FileUploadFinished ($event->tusFile). It fires only for the request that actually completes the upload.
TusFile also exposes id, path, disk, and metadata. Use delete() when you keep an existing object instead of moving the temp file.
FileUploadCreated is available if you need to react when an upload is created.
Ownership
Anonymous uploads work out of the box — the unguessable upload URL is the credential.
When a Laravel user is authenticated, the upload is bound to that user. Later HEAD / PATCH / DELETE must come from the same user. Set tus.ownership.enabled to false for URL-only access, or implement UploadOwnerResolver and set tus.ownership.resolver.
Scheduling
tus:prune aborts expired multipart uploads and deletes stale rows. tus:dispatch-finished delivers FileUploadFinished if a worker died after S3 completed.
Protocol
Tus 1.0: OPTIONS, POST (creation), HEAD, PATCH, DELETE (termination).
Extensions: creation, expiration, checksum, termination.
Not implemented: concatenation, creation-with-upload.
Testing
The default suite uses local Flysystem fakes. To also run S3 multipart tests against MinIO:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Oliver Kaufmann
- All Contributors
License
The MIT License (MIT).
All versions of laravel-tus-s3 with dependencies
illuminate/contracts Version ^13.0
league/flysystem-aws-s3-v3 Version ^3.0
league/flysystem-path-prefixing Version ^3.0
spatie/laravel-package-tools Version ^1.16