UploadComponent
Represents the Kendo UI Upload component for Angular.
Definition
Package:@progress/kendo-angular-upload
Selector:kendo-upload
Export Name:Accessible in templates as #kendoUploadInstance="kendoUpload"
Syntax:
<kendo-upload
[saveUrl]="uploadSaveUrl"
[removeUrl]="uploadRemoveUrl">
</kendo-upload>
Inputs
accept
string
Sets the accept attribute of the internal input element of the component.
Specifies the layout of the action buttons.
'end'
autoUpload
boolean
Specifies whether selected files upload automatically
(see example).
Set autoUpload to false to change this behavior.
true
batch
boolean
Specifies whether all files in the selection upload in a single request (see example). Files selected one after the other upload in separate requests.
false
chunkable
boolean | ChunkSettings
Specifies whether the chunk functionality of the Upload is enabled.
false
concurrent
boolean
Specifies whether selected files upload simultaneously or one by one.
true
disabled
boolean
Disables the component.
false
multiple
boolean
Allows you to select multiple files.
When you set this to false, you can select only one file at a time.
true
removeField
string
Specifies the FormData key which contains the list of file names submitted to removeUrl.
removeHeaders
HttpHeaders
Specifies the HttpHeaders attached to each remove request.
removeMethod
string
Specifies the RequestMethod of the remove request.
removeUrl
string
Specifies the URL of the endpoint for the remove request.
The FormData request key uses the name from the removeField property.
This key contains the list of file names to be removed.
responseType
"arraybuffer" | "blob" | "json" | "text"
Specifies the expected response type of the server.
The response type determines how the response is parsed.
'json'
Sets the restrictions for selected files.
saveHeaders
HttpHeaders
Specifies the HttpHeaders attached to each upload request.
saveMethod
string
Specifies the RequestMethod of the upload request.
saveUrl
string
Specifies the URL of the endpoint for the upload request.
The request FormData key uses the name from the saveField property.
This key contains the list of files to be uploaded.
showFileList
boolean
Specifies whether the file list is visible.
true
withCredentials
boolean
Specifies whether credentials (cookies, headers) are sent for cross-site requests
(see example).
Set withCredentials has no effect on same-site requests.
Use the saveHeaders or removeHeaders property to add credentials to the request.
You can also use the upload event.
true
zoneId
string
Sets the id of the external drop zone that you want to associate with the component.
Events
blur
EventEmitter<any>
Fires when you navigate outside the component.
Fires when the upload is canceled while in progress.
Fires when the file list is about to be cleared. Prevent this event to keep the files in the list.
complete
EventEmitter<any>
Fires when all active uploads complete successfully or with errors.
Fires when an upload or remove operation fails.
focus
EventEmitter<any>
Fires when you focus the component.
pause
EventEmitter<any>
Fires when the upload of a file is paused.
Fires when you are about to remove a file. If you prevent this event, the file will remain in the list.
resume
EventEmitter<any>
Fires when the upload of a file is resumed.
Fires when you select files. If you prevent this event, the component will not add the selected files to the list.
Fires when an upload or remove operation completes successfully.
Fires when one or more files are about to be uploaded. Prevent this event to stop the files from uploading and being added to the file list.
Fires when one or more files are uploading.
Fires when the component value changes after a successful upload, remove, or clear operation.
Methods
Blurs the component if you previously focused it.
Cancels the upload of a file or a batch of files.
The uid of the file or a batch of files that will be canceled.
Clears all files from the UI without sending requests to the remove handler.
Focuses the component's Select files button.
Pauses the upload process of a file that is currently uploading.
This method requires the chunkable option of the Upload to be enabled.
The uid of the file that will be paused.
Removes a file or a batch of files.
The uid of the file or a batch of files that will be removed.
Resumes the upload process for a file that was previously paused.
This method requires the chunkable option of the Upload to be enabled.
The uid of the file that will be resumed.
Retries the upload of a file or batch of files that failed to upload.
The uid of the file or a batch of files to be retried.
Uploads the currently selected files that pass the set restrictions.