New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Upload

Class

Kendo UI Upload component

Definition

Constructors

Initializes a new instance of the Upload class.

C#
public Upload(ViewContext viewContext)
Parameters:viewContextViewContext

Properties

Configures the asynchronous upload of files. For more details, refer to the article on the async mode of the Upload.

C#
public UploadAsyncSettings Async { get; }

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.

C#
public bool? Directory { get; set; }

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.

C#
public bool? DirectoryDrop { get; set; }

Initializes a drop-zone element based on a given selector, which provides the drag-and-drop file upload.

C#
public string DropZone { get; set; }

Enabled member.

C#
public bool? Enabled { get; set; }

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.

C#
public List<UploadFile> Files { get; set; }

Messages member.

C#
public UploadMessagesSettings Messages { get; }

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.

C#
public bool? Multiple { get; set; }

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.

C#
public bool? ShowFileList { get; set; }

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

C#
public string Template { get; set; }

The handler that returns the template used for Template

C#
public string TemplateHandler { get; set; }

The id of the script element used for Template

C#
public string TemplateId { get; set; }

Configures the validation options for uploaded files.

C#
public UploadValidationSettings Validation { get; }

Methods

GetElement method.

C#
protected override TagBuilder GetElement()
Returns:

TagBuilder

Overrides: WidgetBase.GetElement()

Serializes the component settings to a dictionary.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

A dictionary of settings.

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

Writes the HTML content.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

The text writer.

Overrides: WidgetBase.WriteHtml(TextWriter)

WriteInitializationScript method.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteInitializationScript(TextWriter)