Upload
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class Upload : WidgetBase, IWidget, IHtmlAttributesContainer, IScriptableComponent, IFormEditor
Inheritance: objectWidgetBaseUpload
Implements:
Inherited Members
Constructors
Initializes a new instance of the Upload class.
public Upload(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
The view context.
initializerIJavaScriptInitializerThe javascript initializer.
urlGeneratorIUrlGeneratorThe URL Generator.
Properties
Configures the ability to upload a files in an asynchronous manner. Please refer to the async mode help topic for more details.
public UploadAsyncSettings Async { get; }
Gets or sets a value indicating if directories can be selected.
public bool Directory { get; set; }
true allows directory upload.
Gets or sets a value indicating if directories can be dropped.
public bool DirectoryDrop { get; set; }
true allows directory drop.
Initializes a dropzone elements based on a given selector that provides drag and drop file upload.
public string DropZone { get; set; }
The jQuery selector for the DropZone
Gets or sets a value indicating if the component is enabled.
public bool Enabled { get; set; }
true if the component should be enabled, false otherwise; the default is true.
Gets the initially rendered files
public IList<UploadFile> Files { get; }
Gets or sets the Upload messages.
public IUploadMessages Messages { get; }
The Upload messages.
Gets or sets a value indicating if multiple file selection is enabled.
public bool Multiple { get; set; }
true if multiple file selection should be enabled, false otherwise; the default is true.
Gets or sets a value indicating whether to show the list of uploaded files
public bool ShowFileList { get; set; }
true if the list of uploaded files should be visible, false otherwise; true by default
Gets or sets the template for the files
public string Template { get; set; }
The template for the files list
public string TemplateHandler { get; set; }
Gets or sets the template Id for the files
public string TemplateId { get; set; }
The template for the files list
Gets or sets the URL generator.
public IUrlGenerator UrlGenerator { get; }
The URL generator.
Defines the Validation uploading settings
public UploadValidationSettings Validation { get; set; }
Methods
public override IDictionary<string, object> Serialize()
Overrides:
Implements:
Writes the Upload HTML.
protected override void WriteHtml(HtmlTextWriter writer)
The writer object.
Overrides:
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The writer object.
Overrides: