UploadBuilder
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.
RETURNS
Returns the current UploadBuilder instance.
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.
RETURNS
Returns the current instance of UploadBuilder .
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
RETURNS
Returns the current UploadBuilder instance.
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.
RETURNS
Returns the current UploadBuilder instance.
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
RETURNS
Returns the current UploadBuilder instance.
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.
RETURNS
Returns the current UploadBuilder instance.
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
RETURNS
Returns the current UploadBuilder instance.
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.
RETURNS
Returns the current instance of UploadBuilder .
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
RETURNS
Returns the current UploadBuilder instance.
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
RETURNS
Returns the current UploadBuilder instance.
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
RETURNS
Returns the current UploadBuilder instance.
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
RETURNS
Returns the current UploadBuilder instance.
TemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
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
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template for Template
RETURNS
Returns the current UploadBuilder instance.
TemplateHandler(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
templateHandler - System.String
The handler that returs the template for Template
RETURNS
Returns the current UploadBuilder instance.
Template(Kendo.Mvc.UI.Fluent.TemplateBuilder)
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
template - TemplateBuilder<TModel>
A Template component that configures the template.
RETURNS
Returns the current UploadBuilder instance.
Validation(System.Action)
Configures the validation options for uploaded files.
Parameters
configurator - System.Action<UploadValidationSettingsBuilder>
The configurator for the validation setting.
RETURNS
Returns the current instance of UploadBuilder .
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<UploadEventBuilder>
The client events action.
RETURNS
Returns the current UploadBuilder instance.
Example
@(Html.Kendo().Upload()
.Name("Upload")
.Events(events => events
.Cancel("onCancel")
)
)
UseMvvmInitialization(System.Boolean)
Specifies if the component should be initialized through MVVM on the client.
Parameters
value - System.Boolean
The value.
RETURNS
Returns the current instance.
UseMvvmInitialization()
Specifies if the component should be initialized through MVVM on the client.
RETURNS
Returns the current instance.
ToComponent()
Returns the internal view component.
RETURNS
The instance that represents the component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
RETURNS
Returns the current instance.
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
RETURNS
Returns the current instance.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
RETURNS
Returns the current instance.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
RETURNS
Returns a DeferredWidgetBuilder instance.
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
RETURNS
Returns the current instance.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
RETURNS
Returns the current instance.
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
Render()
Renders the component in place.
ToHtmlString()
Returns the HTML representation of the component.
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
Returns the client template for the component.
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
RETURNS
Returns the current instance.