UploadFile

external interface UploadFile

A file tracked by the upload manager.

Upstream is a File extended with upload progress state. Kotlin external interfaces cannot extend a Kotlin/JS class, so the common File properties are repeated here; instances are still real File objects at runtime. The xhr property is only set while the file is being uploaded.

Properties

Link copied to clipboard
abstract var abort: Boolean?

Whether the upload was aborted.

Link copied to clipboard
abstract var complete: Boolean?

Whether the upload completed.

Link copied to clipboard
abstract var elapsed: Double

Elapsed upload time in seconds.

Link copied to clipboard
abstract var errorKey: String

The error key when status is error.

Link copied to clipboard
abstract var formDataName: String?

The form data field name of the file.

Link copied to clipboard
abstract var held: Boolean?

Whether the upload is held.

Link copied to clipboard
abstract var indeterminate: Boolean?

Whether the progress is indeterminate.

Link copied to clipboard
abstract val lastModified: Double

The last modified time, in milliseconds since the Unix epoch.

Link copied to clipboard
abstract var loaded: Double

Uploaded size in bytes.

Link copied to clipboard
abstract val name: String

The file name.

Link copied to clipboard
abstract var progress: Double

Upload progress in percent.

Link copied to clipboard
abstract var remaining: Double

Remaining upload time in seconds.

Link copied to clipboard
abstract val size: Double

The file size in bytes.

Link copied to clipboard
abstract var speed: Double

Upload speed in bytes per second.

Link copied to clipboard
abstract var stalled: Boolean?

Whether the upload stalled.

Link copied to clipboard
abstract var status: String

The upload status, for example queued, uploading, complete, or error.

Link copied to clipboard
abstract var total: Double

Total size in bytes.

Link copied to clipboard
abstract val type: String

The MIME type, or an empty string when unknown.

Link copied to clipboard
abstract var uploading: Boolean?

Whether the upload is in progress.

Link copied to clipboard
abstract var uploadTarget: String

The URL the file is uploaded to.

Link copied to clipboard
abstract var xhr: XMLHttpRequest?

The request performing the upload.