BaseUploadPopUp
A component taking care of uploads within a pop up
Props
| Prop name | Description | Type | Values | Default |
|---|---|---|---|---|
| fileList | register files to upload array with file-object(s) from file-input field | array | - | [] |
| currentStatus | define current status | string | initial, saving, success, failed | 'initial' |
| cancelButtonText | define button text could be string or path to i18n json as well | string | - | 'cancel' |
| uploadText | specify informational texts for the component - this needs to be an object with the following properties: title string - text used in the popup headerupload string - default button textdone string - button text when upload finishedretry string - button text when an upload error occursquotaExceeded - string text used when user quota is exceededThe values of this object might be plain text or a key for an i18n file | object | - | { title: 'File Upload', upload: 'Upload', done: 'Done', retry: 'Try Again', quotaExceeded: 'Unfortunately you exceeded your quota, because you have ' + 'only {space} of space left. Please remove some files to enable uploading.' } |
| uploadPercentage | current upload progress in percent per file array with current upload progress per file e.g. [11, 55, 100] | array | - | [] |
| userSpace | define current free storage space (bytes) | number | - | 10000000 |
| rejectedFiles | define rejected files array with filename(s) | array | - | [] |
| uploadedFiles | define uploaded files array with filename(s) | array | - | [] |
| fileErrors | define errors for rejected files array with objects eg: [{ name: 'foo.txt', message: 'The file may include a virus' }]Note: each object must contain the properties: name, message | array | - | [] |
Events
| Event name | Properties | Description |
|---|---|---|
| remove-file | undefined number - index of the file entry | Event emitted when remove button on file entry is clicked |
| start-upload | Event emitted when upload button is clicked | |
| cancel-upload | Event emitted when cancel button is clicked |
Slots
| Name | Description | Bindings |
|---|---|---|
| default | slot for additional content after upload bars but before buttons |