Browse API 1 documentation
context.progress()
Update native upload progress for the active handler.
Mango 3.1+View Markdown
Update native upload progress for the active handler.
Signature
ts
context.progress(fraction: number): void
Availability
Only on the context object passed to an active upload handler.
Parameters
| Parameter | Required | Description |
|---|---|---|
fraction |
Yes | Finite fraction of completed work. 0 means starting; 1 means complete. Supply a fraction, not a 0–100 percentage. |
Return value
Returns undefined.
Behavior and errors
Finite values are clamped to 0–1. Non-finite values and inactive upload IDs are ignored. Reporting 1 does not finish the handler: Mango still requires a valid returned URL. Mango reports initial 0 and final 1 itself. No cancellation or backpressure signal is returned.
Example
js
// Inside an upload handler:
context.progress(0.5) // halfway, not 50