All Components

UploadComponent

Represents the Kendo UI Upload component for Angular.

Selector

kendo-upload

Export Name

Accessible in templates as #kendoUploadInstance="kendoUpload"

Inputs

accept string

Sets the accept attribute of the input element of the Upload.

disabled boolean

Disables the Upload. The default value is false.

multiple boolean

Enables the selection of multiple files.
If set to false, only one file can be selected at a time.

showFileList boolean

Toggles the visibility of the file list.

tabIndex number

Specifies the tabIndex of the component.

autoUpload boolean

By default, the selected files are immediately uploaded. To change this behavior, set autoUpload to false.

batch boolean

When enabled, all files in the selection are uploaded in one request.
Any files that are selected one after the other are uploaded in separate requests.

removeField string

Sets the FormData key
which contains the list of file names that are submitted to removeUrl.
The default value is fileNames.

removeHeaders HttpHeaders

Configures the Headers
that are attached to each remove request.

removeMethod string

Sets the RequestMethod of the remove request.
The default value is POST.

removeUrl string

Sets the URL of the endpoint for the remove request.
The FormData request key is named after the removeField property.
It contains the list of file names which will be removed.

responseType "arraybuffer" | "blob" | "json" | "text"

Sets the expected response type of the server.
It is used to parse the response appropriately.
The default value is json.

restrictions FileRestrictions

Sets the restrictions for selected files. For more information,
refer to the API documentation on FileRestrictions.

saveField string

Sets the FormData key which contains the files submitted to saveUrl.
The default value is files.

saveHeaders HttpHeaders

Configures the Headers
that are attached to each upload request.

saveMethod string

Sets the RequestMethod of the upload request.
The default value is POST.

saveUrl string

Sets the URL of the endpoint for the upload request.
The request FormData key is named after the saveField property.
It contains the list of files to be uploaded.

withCredentials boolean

Configures whether credentials (cookies, headers) will be sent for cross-site requests.
The default values is true.
Setting withCredentials has no effect on same-site requests.
To add credentials to the request, use the saveHeaders or removeHeaders property,
or the upload event.

Events

blur EventEmitter

Fires when the user navigates outside the component.

cancel EventEmitter<CancelEvent>

Fires when the upload is canceled while in progress.

clear EventEmitter<ClearEvent>

Fires when the file list is about to be cleared. If prevented, the files will not be cleared.

complete EventEmitter

Fires when all active uploads are completed either successfully or with errors.

error EventEmitter<ErrorEvent>

Fires when an upload or remove operation has failed.

focus EventEmitter

Fires when the component is focused.

remove EventEmitter<RemoveEvent>

Fires when an uploaded file is about to be removed. If prevented, the files will remain in the list.

select EventEmitter<SelectEvent>

Fires when files are selected. If prevented, the selected files will not be added to the list.

success EventEmitter<SuccessEvent>

Fires when an upload or remove operation is successfully completed.

upload EventEmitter<UploadEvent>

Fires when one or more files are about to be uploaded. If prevented, the files will neither be uploaded, nor added to the file list.

uploadProgress EventEmitter<UploadProgressEvent>

Fires when one or more files are being uploaded.

valueChange EventEmitter>

Fires when the value of the component has changed as a result of a successful upload, remove or clear operation.

Methods

blurComponent

Blurs the Upload if it was previously focused.

cancelUploadByUid

Cancels the upload of a file or a batch of files.

Parameters

uid string

The uid of the file or a batch of files that will be canceled.

focusComponent

Focuses the underlying input element.

removeFilesByUid

Triggers the removal of a file or a batch of files.

Parameters

uid string

The uid of the file or a batch of files that will be removed.

retryUploadByUid

Triggers another upload attempt of an unsuccessfully uploaded file or a batch of files.

Parameters

uid string

The uid of the file or a batch of files to be retried.

uploadFiles

Uploads the currently selected files which pass the set restrictions.

In this article