An AJAX upload file item, as used by the AJAX upload manager.

Hierarchy

Index

Properties

arrayBuffer

arrayBuffer: function
returns

A promise for an array buffer with the file data.

Type declaration

    • (): Promise<ArrayBuffer>
    • Returns Promise<ArrayBuffer>

blob

blob: function
returns

A promise for a blob with the file data.

Type declaration

    • (): Promise<Blob>
    • Returns Promise<Blob>

dataUrl

dataUrl: function
returns

A promise for a data URL (e.g. base64) with the file data.

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

field

field: function
returns

The DOM element of the upload form field.

Type declaration

lastModified

lastModified: number

UNIX timestamp with the last time the file was modified.

name

name: string

The name of the file.

size

size: number

The size in bytes of the file's data.

state

The current state of the AJAX upload.

success

success: function
returns

A promise that is resolved when the upload was transmitted to the server successfully, and rejected otherwise.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

text

text: function
returns

A promise for the text string with the file data. This interprets the file data with the UTF-8 encoding.

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

type

type: string

The content type of the file.