Skip to content

UploadOpts

Defined in: src/http-api/interface.ts:181

optional abortController?: AbortController

Defined in: src/http-api/interface.ts:203


optional includeFilename?: boolean

Defined in: src/http-api/interface.ts:196

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


optional name?: string

Defined in: src/http-api/interface.ts:185

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


optional type?: string

Defined in: src/http-api/interface.ts:190

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

optional progressHandler(progress): void

Defined in: src/http-api/interface.ts:202

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).

UploadProgress

void