Skip to main content

Progress tracking

Pass an onProgress callback to upload() to track upload progress:

Progress payload

onProgress is called once per segment upload completion. It is not called for the encryption step or the manifest upload.

Abort uploads

Use an AbortController to cancel an in-flight upload:
When aborted:
  • All in-flight S3 uploads are cancelled
  • The upload() promise resolves with { ok: false, error: { code: "ABORTED" } }
  • Already-uploaded segments remain in S3 (they are not cleaned up automatically)

Cleaning up partial uploads

If you need to clean up partially uploaded segments after an abort, use the segment URLs from the progress callback: