menu

ASP.NET Core - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Uploader - ASP.NETCore-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Uploader

    Inheritance
    System.Object
    Syncfusion.EJ2.EJTagHelper
    Uploader
    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
    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
    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
    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
    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
    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
    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.

    Declaration
    public UploaderButtonsProps Buttons { get; set; }
    Property Value
    Type Description
    UploaderButtonsProps

    The default value is null

    Canceling

    Fires if cancel the chunk file uploading.

    Declaration
    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
    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
    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
    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
    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
    public string Clearing { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Created

    Triggers when the component is created.

    Declaration
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    public List<UploaderUploadedFiles> Files { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<UploaderUploadedFiles>

    The default value is null

    For

    Declaration
    public override ModelExpression For { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression
    Overrides
    Syncfusion.EJ2.EJTagHelper.For

    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    public string Uploading { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

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