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

UploadBuilder

Defines the fluent API for configuring the Kendo UI Upload

Properties

WriteAction - Func

Methods

Enable(System.Boolean)

Parameters

value - System.Boolean

Messages(System.Action)

Sets the strings rendered by the Upload.

Parameters

configurator - System.Action<UploadMessagesSettingsBuilder>

The configurator for the localization setting.

Async(System.Action)

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

Parameters

configurator - System.Action<UploadAsyncSettingsBuilder>

The configurator for the async setting.

Directory(System.Boolean)

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.

Parameters

value - System.Boolean

The value for Directory

Directory()

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.

DirectoryDrop(System.Boolean)

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.

Parameters

value - System.Boolean

The value for DirectoryDrop

DirectoryDrop()

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.

DropZone(System.String)

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

Parameters

value - System.String

The value for DropZone

Files(System.Action)

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.

Parameters

configurator - System.Action<UploadFileFactory>

The configurator for the files setting.

Multiple(System.Boolean)

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.

Parameters

value - System.Boolean

The value for Multiple

ShowFileList(System.Boolean)

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.

Parameters

value - System.Boolean

The value for ShowFileList

Template(System.String)

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

Parameters

value - System.String

The value for Template

TemplateId(System.String)

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

Parameters

templateId - System.String

The ID of the template element for Template

Validation(System.Action)

Configures the validation options for uploaded files.

Parameters

configurator - System.Action<UploadValidationSettingsBuilder>

The configurator for the validation setting.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<UploadEventBuilder>

The client events action.

Example


            @(Html.Kendo().Upload()
                  .Name("Upload")
                  .Events(events => events
                      .Cancel("onCancel")
                  )
            )

ToComponent()

Returns the internal view component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

Render()

Renders the component in place.

ToHtmlString()

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

In this article
Not finding the help you need?