Progress tracking
Pass anonProgress callback to upload() to track upload progress:
Progress payload
| Field | Type | Description |
|---|---|---|
completed | number | Number of segments uploaded so far |
total | number | Total number of segments |
current | string | Filename of the segment currently being uploaded |
onProgress is called once per segment upload completion. It is not called for the encryption step or the manifest upload.
Abort uploads
Use anAbortController to cancel an in-flight upload:
- 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)