New to Kendo UI for AngularStart a free 30-day trial

Definition

Package:@progress/kendo-angular-upload

Selector:kendo-upload

Export Name:Accessible in templates as #kendoUploadInstance="kendoUpload"

Syntax:

html
<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.

Default:

'end'

autoUpload

boolean

Specifies whether selected files upload automatically (see example). Set autoUpload to false to change this behavior.

Default:

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.

Default:

false

Specifies whether the chunk functionality of the Upload is enabled.

Default:

false

concurrent

boolean

Specifies whether selected files upload simultaneously or one by one.

Default:

true

disabled

boolean

Disables the component.

Default:

false

multiple

boolean

Allows you to select multiple files. When you set this to false, you can select only one file at a time.

Default:

true

Specifies the FormData key which contains the list of file names submitted to removeUrl.

removeHeaders

HttpHeaders

Specifies the HttpHeaders attached to each remove request.

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.

Default:

'json'

Sets the restrictions for selected files.

saveField

string

Specifies the FormData key which contains the files submitted to saveUrl.

saveHeaders

HttpHeaders

Specifies the HttpHeaders attached to each upload request.

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.

Specifies whether the file list is visible.

Default:

true

tabindex

number

Sets the tabindex of the component.

Default:

0

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.

Default:

true

zoneId

string

Sets the id of the external drop zone that you want to associate with the component.

Events

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.

Fires when all active uploads complete successfully or with errors.

Fires when an upload or remove operation fails.

Fires when you focus the component.

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.

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.

Parameters:uidstring

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.

Parameters:uidstring

The uid of the file that will be paused.

Removes a file or a batch of files.

Parameters:uidstring

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.

Parameters:uidstring

The uid of the file that will be resumed.

Retries the upload of a file or batch of files that failed to upload.

Parameters:uidstring

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

Uploads the currently selected files that pass the set restrictions.