title | description | api_reference | slug |
---|---|---|---|
Upload API |
API Index | Upload |
true |
api_uploadcomponent_wrapper |
kendo-upload
Configures the asynchronous upload of files (async
in Kendo UI for jQuery). The supported composite props are available in [AsyncProps
]({% slug api_upload_asyncprops_wrapper %}).
Enables the selection of folders instead of files (directory
in Kendo UI for jQuery). When the user selects a directory, its entire content hierarchy of files is included in the set of selected items. The directory
setting is available only in browsers which support webkitdirectory
.
Enables the dropping of folders to the Upload and its drop zone (directoryDrop
in Kendo UI for jQuery). When the user drops a directory, its entire content hierarchy of files is included in the set of selected items. The directoryDrop
setting is available only in browsers which support DataTransferItem
and webkitGetAsEntry
.
Based on a specific selector, initializes a drop-zone
element which provides for the drag-and-drop file upload (dropZone
in Kendo UI for jQuery).
If enabled
id set to true
, the Upload is enabled (enabled
in Kendo UI for jQuery). To re-enable a disabled Upload, use enable()
.
The list of files that will be initially rendered in the file list of the Upload (files
in Kendo UI for jQuery). The supported composite props are available in [FilesProps
]({% slug api_upload_filesprops_wrapper %}).
Each file
object in the array has to contain the following properties:
name
size
extension
Sets the strings that are rendered by the Upload (localization
in Kendo UI for jQuery). The supported composite props are available in [LocalizationProps
]({% slug api_upload_localizationprops_wrapper %}).
- If
multiple
is set totrue
, the selection of multiple files is enabled (multiple
in Kendo UI for jQuery). - If
multiple
is set tofalse
, the user can select only one file at a time.
If show-file-list
is set to true
, the display of a file listing for the file upload is enabled (showFileList
in Kendo UI for jQuery). The disabling of a file listing might be useful if you want to customize the UI. To build your own UI, use the client-side events.
Sets a template for rendering the files in the file list (template
in Kendo UI for jQuery).
The template data array consists of the following properties:
name
—The name of the file. If used in the batch upload mode,name
represents a comma-separated string combination of all file names.size
—The file size (in bytes). If used in the batch upload mode,size
represents the total file size. If not available, the value isnull
.files
—An array which contains information about all selected files (name, size, and extension).
The validation options for the uploaded files (validation
in Kendo UI for jQuery). The supported composite props are available in [ValidationProps
]({% slug api_upload_validationprops_wrapper %}).
Fires when the upload was cancelled while in progress (cancel
in Kendo UI for jQuery).
Fires when the files are cleared through the Clear button (clear
in Kendo UI for jQuery).
Fires when all active uploads complete—either successfully or with errors (complete
in Kendo UI for jQuery).
Fires when an upload or a remove
operation fails (error
in Kendo UI for jQuery).
Fires when the files are cleared through the Pause button (pause
in Kendo UI for jQuery). The button is visible if chunksize
is set.
Fires when the data about the progress of the upload is available (progress
in Kendo UI for jQuery).
Fires when the files are resumed through the Resume button (resume
in Kendo UI for jQuery). The button is visible if chunksize
is set and the file upload is paused.
Fires when an uploaded file is about to be removed (remove
in Kendo UI for jQuery). If remove
is canceled, the remove
operation is prevented.
Fires when a file is selected (select
in Kendo UI for jQuery).
Fires when an upload or a remove
operation is successfully completed (success
in Kendo UI for jQuery).
Fires when one or more files are about to be uploaded (upload
in Kendo UI for jQuery). The canceling of the upload
event prevents the upload.
For more details about the methods available in the component's API please check its Kendo UI for jQuery API documentation.
Returns the Kendo UI Upload instance.