Skip to content

Function: fetchUploader() ​

ts
function fetchUploader(options): UploadFn;

Upload as multipart/form-data POST and read the stored file's URL from the JSON response ({ "url": "…" } by default). Reports progress.

Parameters ​

ParameterType
optionsFetchUploaderOptions

Returns ​

UploadFn

Example ​

ts
imageUpload({ upload: fetchUploader({ url: '/api/images', headers: { 'X-CSRF-Token': token } }) })