ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Uploader

    Show / Hide Table of Contents

    Class Uploader

    Inheritance
    System.Object
    TagHelper
    EJTagHelper
    Uploader
    Inherited Members
    EJTagHelper.GetList()
    EJTagHelper.GetSerializedProperties()
    EJTagHelper.GetScriptString()
    EJTagHelper.GetHtmlAttrString(IDictionary<String, Object>)
    EJTagHelper.TagName
    EJTagHelper.Id
    EJTagHelper.NameSpace
    EJTagHelper.ClassName
    EJTagHelper.IsFor
    EJTagHelper.IsChild
    EJTagHelper.IsComplex
    EJTagHelper.IsCollection
    EJTagHelper.ParentPropertyName
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.EJ2.Inputs
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class Uploader : EJTagHelper

    Constructors

    Uploader()

    Declaration
    public Uploader()

    Properties

    ActionComplete

    Triggers after all the selected files has processed to upload successfully or failed to server.

    Declaration
    [HtmlAttributeName("actionComplete")]
    public string ActionComplete { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    AllowedExtensions

    Specifies the extensions of the file types allowed in the uploader component and pass the extensions with comma separators. For example, if you want to upload specific image files, pass allowedExtensions as “.jpg,.png”.

    Declaration
    [HtmlAttributeName("allowedExtensions")]
    public string AllowedExtensions { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    AsyncSettings

    Configures the save and remove URL to perform the upload operations in the server asynchronously.

    Declaration
    [HtmlAttributeName("asyncSettings")]
    public UploaderAsyncSettings AsyncSettings { get; set; }
    Property Value
    Type Description
    UploaderAsyncSettings

    The default value is null

    AutoUpload

    By default, the uploader component initiates automatic upload when the files are added in upload queue. If you want to manipulate the files before uploading to server, disable the autoUpload property. The buttons “upload” and “clear” will be hided from file list when autoUpload property is true.

    Declaration
    [HtmlAttributeName("autoUpload")]
    public bool AutoUpload { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    BeforeRemove

    Triggers on remove the uploaded file. The event used to get confirm before remove the file from server.

    Declaration
    [HtmlAttributeName("beforeRemove")]
    public string BeforeRemove { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    BeforeUpload

    Triggers when the upload process before. This event is used to add additional parameter with upload request.

    Declaration
    [HtmlAttributeName("beforeUpload")]
    public string BeforeUpload { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Buttons

    You can customize the default text of “browse, clear, and upload” buttons with plain text or HTML elements. The buttons’ text can be customized from localization also. If you configured both locale and buttons property, the uploader component considers the buttons property value. {% codeBlock src='uploader/buttons/index.md' %}{% endcodeBlock %}

    Declaration
    [HtmlAttributeName("buttons")]
    public UploaderButtonsProps Buttons { get; set; }
    Property Value
    Type Description
    UploaderButtonsProps

    The default value is null

    Canceling

    Fires if cancel the chunk file uploading.

    Declaration
    [HtmlAttributeName("canceling")]
    public string Canceling { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Change

    Triggers when changes occur in uploaded file list by selecting or dropping files.

    Declaration
    [HtmlAttributeName("change")]
    public string Change { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ChunkFailure

    Fires if the chunk file failed to upload.

    Declaration
    [HtmlAttributeName("chunkFailure")]
    public string ChunkFailure { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ChunkSuccess

    Fires when the chunk file uploaded successfully.

    Declaration
    [HtmlAttributeName("chunkSuccess")]
    public string ChunkSuccess { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ChunkUploading

    Fires when every chunk upload process gets started. This event is used to add additional parameter with upload request.

    Declaration
    [HtmlAttributeName("chunkUploading")]
    public string ChunkUploading { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Clearing

    Triggers before clearing the items in file list when clicking “clear”.

    Declaration
    [HtmlAttributeName("clearing")]
    public string Clearing { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Created

    Triggers when the component is created.

    Declaration
    [HtmlAttributeName("created")]
    public string Created { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CssClass

    Specifies the CSS class name that can be appended with root element of the uploader. One or more custom CSS classes can be added to a uploader.

    Declaration
    [HtmlAttributeName("cssClass")]
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    DirectoryUpload

    Specifies a Boolean value that indicates whether the folder of files can be browsed in the uploader component.

    Declaration
    [HtmlAttributeName("directoryUpload")]
    public bool DirectoryUpload { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    DropArea

    Specifies the drop target to handle the drag-and-drop upload. By default, the component creates wrapper around file input that will act as drop target.

    Declaration
    [HtmlAttributeName("dropArea")]
    public string DropArea { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DropEffect

    Specifies the drag operation effect to the uploader component. Possible values are Copy , Move, Link and None.

    Declaration
    [HtmlAttributeName("dropEffect")]
    public DropEffect DropEffect { get; set; }
    Property Value
    Type Description
    DropEffect

    The default value is DropEffect.Default

    Enabled

    Specifies Boolean value that indicates whether the component is enabled or disabled. The uploader component does not allow to interact when this property is disabled.

    Declaration
    [HtmlAttributeName("enabled")]
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    EnableHtmlSanitizer

    Specifies Boolean value that indicates whether to prevent the cross site scripting code in filename or not. The uploader component removes the cross-site scripting code or functions from the filename and shows the validation error message to the user when enableHtmlSanitizer is true.

    Declaration
    [HtmlAttributeName("enableHtmlSanitizer")]
    public bool EnableHtmlSanitizer { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

    Declaration
    [HtmlAttributeName("enablePersistence")]
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    [HtmlAttributeName("enableRtl")]
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    Failure

    Triggers when the AJAX request fails on uploading or removing files.

    Declaration
    [HtmlAttributeName("failure")]
    public string Failure { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    FileListRendering

    Triggers before rendering each file item from the file list in a page. It helps to customize specific file item structure.

    Declaration
    [HtmlAttributeName("fileListRendering")]
    public string FileListRendering { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Files

    Specifies the list of files that will be preloaded on rendering of uploader component. The property used to view and remove the uploaded files from server. By default, the files are configured with uploaded successfully state. The following properties are mandatory to configure the preload files: Name Size Type

    Declaration
    [HtmlAttributeName("files")]
    public List<UploaderUploadedFiles> Files { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<UploaderUploadedFiles>

    The default value is null

    HtmlAttributes

    You can add the additional html attributes such as disabled, value etc., to the element. If you configured both property and equivalent html attribute then the component considers the property value.

    Declaration
    [HtmlAttributeName("htmlAttributes")]
    public object HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    Locale

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    [HtmlAttributeName("locale")]
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    MaxFileSize

    Specifies the maximum allowed file size to be uploaded in bytes. The property used to make sure that you cannot upload too large files.

    Declaration
    [HtmlAttributeName("maxFileSize")]
    public double MaxFileSize { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 30000000

    MinFileSize

    Specifies the minimum file size to be uploaded in bytes. The property used to make sure that you cannot upload empty files and small files.

    Declaration
    [HtmlAttributeName("minFileSize")]
    public double MinFileSize { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    Multiple

    Specifies a Boolean value that indicates whether the multiple files can be browsed or dropped simultaneously in the uploader component.

    Declaration
    [HtmlAttributeName("multiple")]
    public bool Multiple { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    Pausing

    Fires if pause the chunk file uploading.

    Declaration
    [HtmlAttributeName("pausing")]
    public string Pausing { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Progress

    Triggers when uploading a file to the server using the AJAX request.

    Declaration
    [HtmlAttributeName("progress")]
    public string Progress { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Removing

    Triggers on removing the uploaded file. The event used to get confirm before removing the file from server.

    Declaration
    [HtmlAttributeName("removing")]
    public string Removing { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Rendering

    DEPRECATED-Triggers before rendering each file item from the file list in a page. It helps to customize specific file item structure.

    Declaration
    [HtmlAttributeName("rendering")]
    public string Rendering { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Resuming

    Fires if resume the paused chunk file upload.

    Declaration
    [HtmlAttributeName("resuming")]
    public string Resuming { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Selected

    Triggers after selecting or dropping the files by adding the files in upload queue.

    Declaration
    [HtmlAttributeName("selected")]
    public string Selected { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SequentialUpload

    By default, the file uploader component is processing the multiple files simultaneously. If sequentialUpload property is enabled, the file upload component performs the upload one after the other.

    Declaration
    [HtmlAttributeName("sequentialUpload")]
    public bool SequentialUpload { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    ShowFileList

    Specifies a Boolean value that indicates whether the default file list can be rendered. The property used to prevent default file list and design own template for file list.

    Declaration
    [HtmlAttributeName("showFileList")]
    public bool ShowFileList { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    Success

    Triggers when the AJAX request gets success on uploading files or removing files.

    Declaration
    [HtmlAttributeName("success")]
    public string Success { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Template

    Specifies the HTML string that used to customize the content of each file in the list.

    Declaration
    [HtmlAttributeName("template")]
    public string Template { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Uploading

    Triggers when the upload process gets started. This event is used to add additional parameter with upload request.

    Declaration
    [HtmlAttributeName("uploading")]
    public string Uploading { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved