FileUploader
Usage
API
Props
| Prop | Type | Description |
|---|
| uploadHandler | Function | (targetFolder, file, progressCallback) => Promise |
| cancelHandler | Function | () => void - Called when upload cancelled |
| jobPreFlightCheckHandler | Function | (job) => Boolean - Return false to skip job |
| tr | Function | Translation function for labels |
Events
| Event | Description |
|---|
| finished | All uploads completed or cancelled |
Methods
| Method | Arguments | Description |
|---|
| 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:
| Property | Type | Description |
|---|
| direction | String | "upload" for upload progress |
| loaded | Number | Bytes uploaded so far |