Skip to content

5.3.0

Choose a tag to compare

@dereuromark dereuromark released this 08 Oct 11:24
· 1 commit to master since this release
857f646

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, expiration and termination extensions. The plugin does not register routes; the application adds two routes and a FileStorage.resumable.authorizer closure, 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, expires and completedExpires. Defaults are listed in config/app.example.php (#63).
  • bin/cake file_storage cleanup removes expired upload sessions and abandoned part files. --uploadsOnly and CleanupService::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 event FileStorage.blobImported (#62).

Upgrading

  • Run the plugin migrations: bin/cake migrations migrate -p FileStorage. The new migration adds the table file_storage_uploads. Until it runs, cleanup skips 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