Skip to content

[codex] Expose TUS upload chunk size#44

Draft
tim-kos wants to merge 1 commit into
mainfrom
codex/tus-chunk-size-and-upload-docs
Draft

[codex] Expose TUS upload chunk size#44
tim-kos wants to merge 1 commit into
mainfrom
codex/tus-chunk-size-and-upload-docs

Conversation

@tim-kos
Copy link
Copy Markdown
Member

@tim-kos tim-kos commented May 22, 2026

What changed

  • Adds tusUploadChunkSize to the Transloadit initializers and passes it through to TUSKit.
  • Allows apps to pass 0 to let TUSKit upload each file in one request, which can be useful for iOS background uploads where scheduling a new task for each 500 KiB chunk can stall.
  • Clarifies that createAssembly(... andUpload ..., completion:) fires after the Assembly is created and uploads are scheduled, not after file upload or processing completion.
  • Documents the recommended lifecycle: use TransloaditFileDelegate.didFinishUpload for upload completion and pollAssemblyStatus for processing completion.
  • Adds tests for the default chunk size, a custom chunk size, and the injected-signature initializer.

Why

A customer using TransloaditKit 3.5.0 saw didFinishUpload() fire while API2 had already aborted the Assembly after seeing only three default TUS chunks. Exposing the chunk size gives apps a way to avoid many small background URLSession tasks, and the docs now make the upload lifecycle explicit.

Validation

  • swift test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant