UploadProps
Represents the props of the Kendo UI for Vue Upload component.
Definition
Package:@progress/kendo-vue-upload
Properties
accept?
string
Sets the accept attribute of the input element of the Upload.
Sets the layout of the action buttons (see example).
'end'
ariaDescribedBy?
string
Sets the id of one or more elements that describe the Upload, similar
to the HTML aria-describedby attribute. For example, these elements
can hold an error or a hint message.
ariaLabelledBy?
string
Sets the id of one or more elements that label the Upload.
autoUpload?
boolean
Uploads the selected files right away.
To upload the files later, set autoUpload to false.
true
batch?
boolean
Uploads all files from one selection in a single request. Files that you select one after the other upload in separate requests.
false
className?
string
Sets a CSS class on the root element of the Upload.
Sets the initial list of files that the Upload shows in uncontrolled mode (see example).
disabled?
boolean
Disables the Upload (see example).
false
Sets the list of files that the Upload shows in controlled mode (see example).
id?
string
Sets the id of the Upload.
list?
any
Sets a custom template for each item in the file list (see example).
Accepts a Vue component, a render function, or a slot name.
The template receives the UploadListItemProps.
multiple?
boolean
Lets you select more than one file at a time
(see example).
When you set it to false, you can select only one file at a time.
true
onAdd?
(event: UploadOnAddEvent) => void
Fires when you select new files for upload.
onBeforeremove?
(event: UploadOnBeforeRemoveEvent) => void
Fires before the Upload sends a remove request. Use it to add extra data to the request.
onBeforeupload?
(event: UploadOnBeforeUploadEvent) => void
Fires before the Upload sends an upload request. Use it to add extra data to the request.
onCancel?
(event: UploadOnCancelEvent) => void
Fires when you click the Remove button while a file is still uploading.
Use it when you set saveUrl to a function, so you can cancel your custom requests.
onProgress?
(event: UploadOnProgressEvent) => void
Fires when the upload progress of a file changes.
onRemove?
(event: UploadOnRemoveEvent) => void
Fires when you remove files. When the Upload sends a request, the event can contain the server response.
onStatuschange?
(event: UploadOnStatusChangeEvent) => void
Fires when the status of the files changes. When the Upload sends a request, the event can contain the server response.
removeField?
string
Sets the FormData key
that holds the list of file names that the Upload sends to removeUrl.
'fileNames'
Sets the HttpHeaders that the Upload attaches to each remove request.
{}
removeMethod?
string
Sets the request method of the remove request.
'POST'
removeUrl?
string | (files: UploadFileInfo[], options: { formData: FormData; requestOptions: any }) => Promise<{ uid: string }>
Sets the URL of the endpoint for the remove request.
The FormData request
key takes its name from the removeField property.
It holds the list of file names to remove.
''
responseType?
"arraybuffer" | "blob" | "json" | "text"
Sets the expected response type of the server. The Upload uses it to parse the response.
'json'
Sets the restrictions for the selected files (see example).
{ allowedExtensions: [], maxFileSize: 0, minFileSize: 0 }
saveField?
string
Sets the FormData key that
holds the files that the Upload sends to saveUrl.
'files'
Sets the HttpHeaders that the Upload attaches to each upload request.
{}
saveMethod?
string
Sets the request method of the upload request.
'POST'
saveUrl?
string | (files: UploadFileInfo[], options: { formData: FormData; requestOptions: any }, onProgress: (uid: string, event: ProgressEvent<EventTarget>) => void) => Promise<{ uid: string }>
Sets the URL of the endpoint for the upload request.
The FormData key takes its name from
the saveField property and holds the list of files to upload.
''
showActionButtons?
boolean
Shows or hides the action buttons.
This property works only when you set autoUpload to false.
true
showFileList?
boolean
Shows or hides the list of files.
true
validateFile?
(file: UploadFileInfo) => void
Sets a function that applies custom restrictions to the selected files (see example).
withCredentials?
boolean
Sets whether the Upload sends credentials, such as cookies and headers, with cross-site requests.
This property has no effect on same-site requests.
To add credentials to the request, use the saveHeaders or removeHeaders property.
true