Templates
You can control how the Upload displays the file list by using either the FileTemplateDirective
or FileInfoTemplateDirective
depending on the desired level of customization.
The following values are available as context variables in both templates:
let-files
—A reference to the files which are associated with the current item.let-state
—A reference to the current state of each file. If thebatch
option of the Upload is set totrue
, the field reflects the state of the whole batch.
File Template
The FileTemplateDirective
allows the full customization of the items in the file list. Therefore, all built-in items, such as the progress bar, action buttons, file size, name and icon, will be replaced by the content provided within the template.
To use the FileTemplateDirective
, nest the <ng-template>
tag inside the <kendo-upload>
selector and apply the kendoUploadFileTemplate
directive to it.
File Info Template
The FileInfoTemplateDirective
is used for customizing the general file information section, while preserving the rest of the built-in features, such as file icon, progress bar and action buttons.
To use the FileInfoTemplateDirective
, nest the <ng-template>
tag inside the <kendo-upload>
selector and apply the kendoUploadFileInfoTemplate
directive to it.