accept |
string 'undefined |
The accept type of upload. See accept. |
|
action |
string 'undefined |
The URL to submit data to. |
|
data |
Object | ({ file: UploadFile }) => Object 'undefined |
The additional fileds data of HTTP request's form data. |
|
default-file-list |
Array<UploadFile> |
[] |
The default file list in uncontrolled manner. |
default-upload |
boolean |
false |
If file uploaded immediatelly after file is selected. |
directory |
boolean |
false |
If directory upload supported. Browser support needed. See input-file-directory. |
disabled |
boolean |
false |
|
file-list-style |
Object 'undefined |
The style of file list area |
|
file-list |
Array<UploadFile> |
undefined |
The file list of component. If set, the component will work in controlled manner. |
headers |
Object | ({ file: UploadFile }) => Object 'undefined |
The additional HTTP Headers of request. |
|
method |
string |
'POST' |
The method of HTTP request. |
multiple |
boolean |
false |
If multiple files selection supported. |
name |
string |
'file' |
The field name of file in form data. |
show-cancel-button |
boolean |
true |
Whether to show remove button (at file pending, uploadin, error status). Click on cancel button will fire on-remove callback. |
show-remove-button |
boolean |
true |
Whether to show remove button (at file finished status). Click on remove button will fire on-remove callback. |
theme |
'light' | 'dark' | string |
undefined |
|
with-credentials |
boolean |
false |
If cookie attached. |
on-change |
(options: { file: UploadFile, fileList: Array<UploadFile>, event?: Event }) => any |
() => {} |
The callback of status change of the component. Any file status change would fire the callback. |
on-finish |
(options: { file: UploadFile }) => UploadFile | void |
({ file }) => file |
The callback of file upload finish. You can modify the UploadFile or retun a new UploadFile. |
on-remove |
(options: { file: UploadFile, fileList: Array<UploadFile> }) => boolean | Promise<boolean> | any |
() => true |
The callback of file removal. Return false, promise resolve false or promise reject will cancel this removal. |