FileUploader

Upload cancelled.

Restart

Usage

API

Props

PropTypeDescription
uploadHandlerFunction(targetFolder, file, progressCallback) => Promise
cancelHandlerFunction() => void - Called when upload cancelled
jobPreFlightCheckHandlerFunction(job) => Boolean - Return false to skip job
trFunctionTranslation function for labels

Events

EventDescription
finishedAll uploads completed or cancelled

Methods

MethodArgumentsDescription
addFiles(files, targetFolder)Add files to upload queue
onUploadFile(targetFolder)Open file picker dialog
onUploadFolder(targetFolder)Open folder picker dialog

Progress Callback

The progressCallback function receives an object with:

PropertyTypeDescription
directionString"upload" for upload progress
loadedNumberBytes uploaded so far