UploadBuilder
Defines the fluent API for configuring the Kendo UI Upload
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class UploadBuilder : MvvmWidgetBuilderBase<Upload, UploadBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<Upload, UploadBuilder>MvvmWidgetBuilderBase<Upload, UploadBuilder>UploadBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the UploadBuilder class.
Methods
Configures the asynchronous upload of files. For more details, refer to the article on the async mode of the Upload.
public UploadBuilder Async(Action<UploadAsyncSettingsBuilder> configurator)
The UploadAsyncSettingsBuilder for the async setting.
Returns:Returns the current instance of UploadBuilder .
Enables the selection of folders instead of files. 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 selection of folders instead of files. 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.
public UploadBuilder Directory(bool value)
The value for Directory
Returns:Returns the current UploadBuilder instance.
Enables the dropping of folders over the Upload and its drop zone. When a directory is dropped, 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.
Enables the dropping of folders over the Upload and its drop zone. When a directory is dropped, 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.
public UploadBuilder DirectoryDrop(bool value)
The value for DirectoryDrop
Returns:Returns the current UploadBuilder instance.
Initializes a drop-zone element based on a given selector, which provides the drag-and-drop file upload.
public UploadBuilder DropZone(string value)
The value for DropZone
Returns:Returns the current UploadBuilder instance.
Enables or disables the Upload component.
Configures the client-side events.
public UploadBuilder Events(Action<UploadEventBuilder> configurator)
The client events action.
Returns:Returns the current UploadBuilder instance.
The list of files that will be initially rendered in the files list of the Upload.Each file object in the array has to contain the following properties: name; size or extension.
public UploadBuilder Files(Action<UploadFileFactory> configurator)
The UploadFileFactory for the files setting.
Returns:Returns the current instance of UploadBuilder .
Sets the strings rendered by the Upload.
public UploadBuilder Messages(Action<UploadMessagesSettingsBuilder> configurator)
The configurator for the localization setting.
Returns:Returns the current UploadBuilder instance.
Enables (if set to true) or disables (if set to false) the selection of multiple files. If set to false, the user can select only one file at a time.
public UploadBuilder Multiple(bool value)
The value for Multiple
Returns:Returns the current UploadBuilder instance.
Enables (if set to true) or disables (if set to false) the display of a file listing for the file upload. 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.
public UploadBuilder ShowFileList(bool value)
The value for ShowFileList
Returns:Returns the current UploadBuilder instance.
Sets a template for rendering the files in the file list.The template data Array consists of: name - The name of the file. If in batch upload mode, represents a string combination of all file names separated with comma.; size - The file size in bytes. If in batch upload mode, represents the total file size. If not available, the value is null. or files - An array which contains information about all selected files (name, size, and extension)..
public UploadBuilder Template(string value)
The value for Template
Returns:Returns the current UploadBuilder instance.
Sets a template for rendering the files in the file list.The template data Array consists of: name - The name of the file. If in batch upload mode, represents a string combination of all file names separated with comma.; size - The file size in bytes. If in batch upload mode, represents the total file size. If not available, the value is null. or files - An array which contains information about all selected files (name, size, and extension)..
public UploadBuilder Template<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the template.
Returns:Returns the current UploadBuilder instance.
Sets a template for rendering the files in the file list.The template data Array consists of: name - The name of the file. If in batch upload mode, represents a string combination of all file names separated with comma.; size - The file size in bytes. If in batch upload mode, represents the total file size. If not available, the value is null. or files - An array which contains information about all selected files (name, size, and extension)..
public UploadBuilder TemplateHandler(string templateHandler)
The handler that returs the template for Template
Returns:Returns the current UploadBuilder instance.
Sets a template for rendering the files in the file list.The template data Array consists of: name - The name of the file. If in batch upload mode, represents a string combination of all file names separated with comma.; size - The file size in bytes. If in batch upload mode, represents the total file size. If not available, the value is null. or files - An array which contains information about all selected files (name, size, and extension)..
public UploadBuilder TemplateId(string templateId)
The ID of the template element for Template
Returns:Returns the current UploadBuilder instance.
Sets a template for rendering the files in the file list.The template data Array consists of: name - The name of the file. If in batch upload mode, represents a string combination of all file names separated with comma.; size - The file size in bytes. If in batch upload mode, represents the total file size. If not available, the value is null. or files - An array which contains information about all selected files (name, size, and extension)..
public UploadBuilder TemplateView(IHtmlContent templateView)
The view that contains the template for Template
Returns:Returns the current UploadBuilder instance.
Configures the validation options for uploaded files.
public UploadBuilder Validation(Action<UploadValidationSettingsBuilder> configurator)
The UploadValidationSettingsBuilder for the validation setting.
Returns:Returns the current instance of UploadBuilder .