18504 - Add TUS resumable upload entity - #19
Open
ghultink wants to merge 1 commit into
Open
Conversation
New Tus entity (->tus) for TUS protocol resumable uploads via /sapi/tus.
Methods:
- initUpload(filename, filesize, clipId?, metadata?) → POST /sapi/tus
Returns uploadId + presigned S3 URLs for direct chunk uploads
- getStatus(uploadId) → HEAD /sapi/tus/{id}
Returns current offset + remaining presigned URLs (for resume)
- complete(uploadId, parts) → POST /sapi/tus/{id}/complete
Finalizes the S3 multipart upload
- abort(uploadId) → DELETE /sapi/tus/{id}
Terminates upload, cleans up S3 state
- signPart(uploadId, partNumber) → GET /sapi/tus/{id}/sign/{part}
Gets a fresh presigned URL for a specific part (re-upload/expired)
All methods follow SDK pattern: async-first with AutoAsyncToSyncCaller.
File data never passes through PHP — only coordination via SAPI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
$sdk->tusentity for TUS protocol resumable uploads via/sapi/tus.Methods
initUpload()/sapi/tusgetStatus()/sapi/tus/{id}complete()/sapi/tus/{id}/completeabort()/sapi/tus/{id}signPart()/sapi/tus/{id}/sign/{part}Usage
Design