UploadProgress

external class UploadProgress(source)

Constructors

Link copied to clipboard
constructor(contentLength: Number)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var timeoutHandle: <Error class: unknown class>?

Functions

Link copied to clipboard
fun display()

Prints the current upload stats. Once the upload completes, this will print one last line and then stop.

Link copied to clipboard

Returns the total number of bytes transferred.

Link copied to clipboard

Returns true if the upload is complete.

Link copied to clipboard
fun onProgress(): (progress: TransferProgressEvent) -> Unit

Returns a function used to handle TransferProgressEvents.

Link copied to clipboard
fun setSentBytes(sentBytes: Number)

Sets the number of bytes sent

Link copied to clipboard
fun startDisplayTimer(delayInMs: Number = definedExternally)

Starts the timer that displays the stats.

Link copied to clipboard

Stops the timer that displays the stats. As this typically indicates the upload is complete, this will display one last line, unless the last line has already been written.