Repository navigation
5.3.0
Improvements
- Resumable uploads. Browsers upload large files in chunks through tus-js-client or Uppy and continue after a dropped connection or a page reload. The endpoint implements tus 1.0.0 core with the
creation,expirationandterminationextensions. The plugin does not register routes; the application adds two routes and aFileStorage.resumable.authorizerclosure, without which every request gets 403. See the resumable uploads guide (#63). ResumableUploads::consume()turns a completed upload into a file row after the application saved its own entity. Validation, deduplication, variants and events run as for a form upload, with the SHA-256 the server computed while receiving the chunks (#63).- Upload limits under
FileStorage.resumable:maxSize,maxBytesPerOwner,maxSessions,maxReservedBytes,minFreeBytes,expiresandcompletedExpires. Defaults are listed inconfig/app.example.php(#63). bin/cake file_storage cleanupremoves expired upload sessions and abandoned part files.--uploadsOnlyandCleanupService::runUploads()run only that part (#63).- New event
FileStorage.uploadCompleted(#63). BlobImporter::import()registers a file that already sits on a storage adapter, for example an object a browser uploaded to S3 with a presigned URL, as a deduplicated blob.BlobAttacher::attach()then creates file rows for it. New eventFileStorage.blobImported(#62).
Upgrading
- Run the plugin migrations:
bin/cake migrations migrate -p FileStorage. The new migration adds the tablefile_storage_uploads. Until it runs,cleanupskips its upload pass with a warning. - Requests to the upload endpoint count as authorized for the Authorization plugin; the resumable authorizer closure is the access check (#64).
Full Changelog: 5.2.0...5.3.0