Interface UploadOpts

interface UploadOpts {
    abortController?: AbortController;
    includeFilename?: boolean;
    name?: string;
    type?: string;
    progressHandler?(progress: UploadProgress): void;
}

Properties

abortController?: AbortController
includeFilename?: boolean

if false will not send the filename, e.g for encrypted file uploads where filename leaks are undesirable. Defaults to true.

name?: string

Name to give the file on the server. Defaults to file.name.

type?: string

Content-type for the upload. Defaults to file.type, or applicaton/octet-stream.

Methods

  • Optional. Called when a chunk of data has been uploaded, with an object containing the fields loaded (number of bytes transferred) and total (total size, if known).

    Parameters

    Returns void