:::demo Customize upload button type and text using `slot`. Set `limit` and `on-exceed` to limit the maximum number of uploads allowed and specify method when the limit is exceeded. Plus, you can abort removing a file in the `before-remove` hook.
| data | additions options of request | object | — | — |
| name | key name for uploaded file | string | — | file |
| with-credentials | whether cookies are sent | boolean | — | false |
| show-file-list | whether to show the uploaded file list | boolean | — | true |
| drag | whether to activate drag and drop mode | boolean | — | false |
| accept | accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode` is `true` | string | — | — |
| on-preview | hook function when clicking the uploaded files | function(file: UploadFile): void | — | — |
| on-remove | hook function when files are removed | function(file: UploadFile, fileList: UploadFile[]): void | — | — |
| on-error | hook function when some errors occurs | function(error, file: UploadFile, fileList: UploadFile[]): void | — | — |
| on-progress | hook function when some progress occurs | function(evt: UploadProgressEvent, file: UploadFile, fileList: UploadFile[]): void | — | — |
| on-change | hook function when select file or upload file success or upload file fail | function(file: UploadFile, fileList: UploadFile[]): void | — | — |
| before-upload | hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted | function(file: RawFile): Awaitable<void \| undefined \| null \| boolean \| File \| Blob> | — | — |
| before-remove | hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted. | function(file: UploadFile, fileList: UploadFile[]): Awaitable\<boolean\> | — | — |
| clearFiles | clear the file list (this method is not supported in the `before-upload` hook). | (status: Array\<"ready"\|"uploading"\|"success"\|"fail"\>) => void | ['ready', 'uploading', 'success', 'fail'] |
| handleRemove | remove the file manually. `file` and `rawFile` has been merged. `rawFile` will be removed in `v2.2.0` | (file: UploadFile \| UploadRawFile, rawFile?:UploadRawFile) => void | - |