• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filter
    • Gantt
    • Gauges
    • Gridupdated
    • Icons
    • Indicators
    • Inputsupdated
    • Labels
    • Layout
    • ListBox
    • ListView
    • Map
    • Menus
    • Navigation
    • Notification
    • Pager
    • PDF Export
    • PDFViewer
    • PivotGridupdated
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • ToolBar
    • Tooltips
    • TreeList
    • TreeView
    • Typography
    • Uploads
    • Utilities
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs
New to Kendo UI for Angular? Start a free 30-day trial

UploadComponent

Represents the Kendo UI Upload component for Angular.

Selector

kendo-upload

Export Name

Accessible in templates as #kendoUploadInstance="kendoUpload"

Inputs

NameTypeDefaultDescription

accept

string

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

actionsLayout

ActionsLayout

Specifies the possible layout of the action buttons.

autoUpload

boolean

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

batch

boolean

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

chunkable

boolean | ChunkSettings

false

Enables the chunk functionality of the Upload.

concurrent

boolean

true

Specifies if the selected files are uploaded simultaneously or one by one.

disabled

boolean

false

Disables the Upload (see example). To learn how to disable the component in reactive forms, refer to the article on Forms Support.

multiple

boolean

true

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

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 HttpHeaders 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"

'json'

Sets the expected response type of the server. It is used to parse the response appropriately.

restrictions

FileRestrictions

Sets the restrictions for selected files (see example).

saveField

string

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

saveHeaders

HttpHeaders

Configures the HttpHeaders 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.

showFileList

boolean

true

Toggles the visibility of the file list.

tabindex

number

0

Specifies the tabindex of the component.

withCredentials

boolean

Configures whether credentials (cookies, headers) will be sent for cross-site requests (see example). 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.

zoneId

string

Specifies the id of the external drop zone to associate with the Upload.

Events

NameTypeDescription

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<any>

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

error

EventEmitter<ErrorEvent>

Fires when an upload or remove operation has failed.

blur

EventEmitter<any>

Fires when the user navigates outside the component.

focus

EventEmitter<any>

Fires when the component is focused.

pause

EventEmitter<any>

Fires when the upload of a file has been paused.

remove

EventEmitter<RemoveEvent>

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

resume

EventEmitter<any>

Fires when the upload of a file has been resumed.

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<FileInfo[]>

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

Methods

blur

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.

clearFiles

Visually clears all files from the UI without issuing requests to the remove handler.

focus

Focuses the underlying input element.

pauseFileByUid

Pauses the upload process of a file that is currently uploading. The pauseFileByUid method requires the chunkable option of the Upload to be enabled.

Parameters

uid

string

The uid of the file that will be paused.

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.

resumeFileByUid

Resumes the upload process for a file that has been previously paused. The resumeFileByUid method requires the chunkable option of the Upload to be enabled.

Parameters

uid

string

The uid of the file that will be resumed.

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.