ASP.NET Core - EJ2

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

    Show / Hide Table of Contents

    Class UploaderBuilder

    Inheritance
    System.Object
    ControlBuilder
    UploaderBuilder
    Inherited Members
    ControlBuilder.Context
    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 UploaderBuilder : ControlBuilder

    Constructors

    UploaderBuilder()

    Declaration
    public UploaderBuilder()

    UploaderBuilder(Uploader)

    Declaration
    public UploaderBuilder(Uploader model)
    Parameters
    Type Name Description
    Uploader model

    Fields

    model

    Declaration
    public Uploader model
    Field Value
    Type Description
    Uploader

    Properties

    HtmlAttr

    Declaration
    public IDictionary<string, object> HtmlAttr { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Object>

    ID

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    Output

    Declaration
    public override TextWriter Output { get; set; }
    Property Value
    Type Description
    System.IO.TextWriter
    Overrides
    ControlBuilder.Output

    Methods

    ActionComplete(String)

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

    Declaration
    public UploaderBuilder ActionComplete(string actionComplete)
    Parameters
    Type Name Description
    System.String actionComplete
    Returns
    Type Description
    UploaderBuilder

    AllowedExtensions(String)

    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 UploaderBuilder AllowedExtensions(string allowedExtensions)
    Parameters
    Type Name Description
    System.String allowedExtensions
    Returns
    Type Description
    UploaderBuilder

    AsyncSettings(UploaderAsyncSettings)

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

    Declaration
    public UploaderBuilder AsyncSettings(UploaderAsyncSettings asyncSettings)
    Parameters
    Type Name Description
    UploaderAsyncSettings asyncSettings
    Returns
    Type Description
    UploaderBuilder

    AsyncSettings(Action<UploaderAsyncSettingsBuilder>)

    Declaration
    public UploaderBuilder AsyncSettings(Action<UploaderAsyncSettingsBuilder> asyncSettings)
    Parameters
    Type Name Description
    System.Action<UploaderAsyncSettingsBuilder> asyncSettings
    Returns
    Type Description
    UploaderBuilder

    AutoUpload(Boolean)

    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 UploaderBuilder AutoUpload(bool autoUpload = true)
    Parameters
    Type Name Description
    System.Boolean autoUpload
    Returns
    Type Description
    UploaderBuilder

    BeforeRemove(String)

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

    Declaration
    public UploaderBuilder BeforeRemove(string beforeRemove)
    Parameters
    Type Name Description
    System.String beforeRemove
    Returns
    Type Description
    UploaderBuilder

    BeforeUpload(String)

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

    Declaration
    public UploaderBuilder BeforeUpload(string beforeUpload)
    Parameters
    Type Name Description
    System.String beforeUpload
    Returns
    Type Description
    UploaderBuilder

    Buttons(UploaderButtonsProps)

    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
    public UploaderBuilder Buttons(UploaderButtonsProps buttons)
    Parameters
    Type Name Description
    UploaderButtonsProps buttons
    Returns
    Type Description
    UploaderBuilder

    Buttons(Action<UploaderButtonsPropsBuilder>)

    Declaration
    public UploaderBuilder Buttons(Action<UploaderButtonsPropsBuilder> buttons)
    Parameters
    Type Name Description
    System.Action<UploaderButtonsPropsBuilder> buttons
    Returns
    Type Description
    UploaderBuilder

    Canceling(String)

    Fires if cancel the chunk file uploading.

    Declaration
    public UploaderBuilder Canceling(string canceling)
    Parameters
    Type Name Description
    System.String canceling
    Returns
    Type Description
    UploaderBuilder

    Change(String)

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

    Declaration
    public UploaderBuilder Change(string change)
    Parameters
    Type Name Description
    System.String change
    Returns
    Type Description
    UploaderBuilder

    ChunkFailure(String)

    Fires if the chunk file failed to upload.

    Declaration
    public UploaderBuilder ChunkFailure(string chunkFailure)
    Parameters
    Type Name Description
    System.String chunkFailure
    Returns
    Type Description
    UploaderBuilder

    ChunkSuccess(String)

    Fires when the chunk file uploaded successfully.

    Declaration
    public UploaderBuilder ChunkSuccess(string chunkSuccess)
    Parameters
    Type Name Description
    System.String chunkSuccess
    Returns
    Type Description
    UploaderBuilder

    ChunkUploading(String)

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

    Declaration
    public UploaderBuilder ChunkUploading(string chunkUploading)
    Parameters
    Type Name Description
    System.String chunkUploading
    Returns
    Type Description
    UploaderBuilder

    Clearing(String)

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

    Declaration
    public UploaderBuilder Clearing(string clearing)
    Parameters
    Type Name Description
    System.String clearing
    Returns
    Type Description
    UploaderBuilder

    Created(String)

    Triggers when the component is created.

    Declaration
    public UploaderBuilder Created(string created)
    Parameters
    Type Name Description
    System.String created
    Returns
    Type Description
    UploaderBuilder

    CssClass(String)

    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 UploaderBuilder CssClass(string cssClass)
    Parameters
    Type Name Description
    System.String cssClass
    Returns
    Type Description
    UploaderBuilder

    DirectoryUpload(Boolean)

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

    Declaration
    public UploaderBuilder DirectoryUpload(bool directoryUpload = true)
    Parameters
    Type Name Description
    System.Boolean directoryUpload
    Returns
    Type Description
    UploaderBuilder

    DropArea(String)

    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 UploaderBuilder DropArea(string dropArea)
    Parameters
    Type Name Description
    System.String dropArea
    Returns
    Type Description
    UploaderBuilder

    DropEffect(DropEffect)

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

    Declaration
    public UploaderBuilder DropEffect(DropEffect dropEffect)
    Parameters
    Type Name Description
    DropEffect dropEffect
    Returns
    Type Description
    UploaderBuilder

    Enabled(Boolean)

    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 UploaderBuilder Enabled(bool enabled = true)
    Parameters
    Type Name Description
    System.Boolean enabled
    Returns
    Type Description
    UploaderBuilder

    EnablePersistence(Boolean)

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

    Declaration
    public UploaderBuilder EnablePersistence(bool enablePersistence = true)
    Parameters
    Type Name Description
    System.Boolean enablePersistence
    Returns
    Type Description
    UploaderBuilder

    EnableRtl(Boolean)

    Enable or disable rendering component in right to left direction.

    Declaration
    public UploaderBuilder EnableRtl(bool enableRtl = true)
    Parameters
    Type Name Description
    System.Boolean enableRtl
    Returns
    Type Description
    UploaderBuilder

    Failure(String)

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

    Declaration
    public UploaderBuilder Failure(string failure)
    Parameters
    Type Name Description
    System.String failure
    Returns
    Type Description
    UploaderBuilder

    FileListRendering(String)

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

    Declaration
    public UploaderBuilder FileListRendering(string fileListRendering)
    Parameters
    Type Name Description
    System.String fileListRendering
    Returns
    Type Description
    UploaderBuilder

    Files(Action<UploaderUploadedFilesBuilder>)

    Declaration
    public UploaderBuilder Files(Action<UploaderUploadedFilesBuilder> files)
    Parameters
    Type Name Description
    System.Action<UploaderUploadedFilesBuilder> files
    Returns
    Type Description
    UploaderBuilder

    Files(List<UploaderUploadedFiles>)

    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 UploaderBuilder Files(List<UploaderUploadedFiles> files)
    Parameters
    Type Name Description
    System.Collections.Generic.List<UploaderUploadedFiles> files
    Returns
    Type Description
    UploaderBuilder

    HtmlAttributes(Object)

    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. {% codeBlock src='uploader/htmlAttributes/index.md' %}{% endcodeBlock %}

    Declaration
    public UploaderBuilder HtmlAttributes(object htmlAttributes)
    Parameters
    Type Name Description
    System.Object htmlAttributes
    Returns
    Type Description
    UploaderBuilder

    Locale(String)

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

    Declaration
    public UploaderBuilder Locale(string locale)
    Parameters
    Type Name Description
    System.String locale
    Returns
    Type Description
    UploaderBuilder

    MaxFileSize(Double)

    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 UploaderBuilder MaxFileSize(double maxFileSize)
    Parameters
    Type Name Description
    System.Double maxFileSize
    Returns
    Type Description
    UploaderBuilder

    MinFileSize(Double)

    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 UploaderBuilder MinFileSize(double minFileSize)
    Parameters
    Type Name Description
    System.Double minFileSize
    Returns
    Type Description
    UploaderBuilder

    Multiple(Boolean)

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

    Declaration
    public UploaderBuilder Multiple(bool multiple = true)
    Parameters
    Type Name Description
    System.Boolean multiple
    Returns
    Type Description
    UploaderBuilder

    Pausing(String)

    Fires if pause the chunk file uploading.

    Declaration
    public UploaderBuilder Pausing(string pausing)
    Parameters
    Type Name Description
    System.String pausing
    Returns
    Type Description
    UploaderBuilder

    Progress(String)

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

    Declaration
    public UploaderBuilder Progress(string progress)
    Parameters
    Type Name Description
    System.String progress
    Returns
    Type Description
    UploaderBuilder

    Removing(String)

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

    Declaration
    public UploaderBuilder Removing(string removing)
    Parameters
    Type Name Description
    System.String removing
    Returns
    Type Description
    UploaderBuilder

    Render()

    Declaration
    public HtmlString Render()
    Returns
    Type Description
    Microsoft.AspNetCore.Html.HtmlString

    Rendering(String)

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

    Declaration
    public UploaderBuilder Rendering(string rendering)
    Parameters
    Type Name Description
    System.String rendering
    Returns
    Type Description
    UploaderBuilder

    Resuming(String)

    Fires if resume the paused chunk file upload.

    Declaration
    public UploaderBuilder Resuming(string resuming)
    Parameters
    Type Name Description
    System.String resuming
    Returns
    Type Description
    UploaderBuilder

    Selected(String)

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

    Declaration
    public UploaderBuilder Selected(string selected)
    Parameters
    Type Name Description
    System.String selected
    Returns
    Type Description
    UploaderBuilder

    SequentialUpload(Boolean)

    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 UploaderBuilder SequentialUpload(bool sequentialUpload = true)
    Parameters
    Type Name Description
    System.Boolean sequentialUpload
    Returns
    Type Description
    UploaderBuilder

    ShowFileList(Boolean)

    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 UploaderBuilder ShowFileList(bool showFileList = true)
    Parameters
    Type Name Description
    System.Boolean showFileList
    Returns
    Type Description
    UploaderBuilder

    Success(String)

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

    Declaration
    public UploaderBuilder Success(string success)
    Parameters
    Type Name Description
    System.String success
    Returns
    Type Description
    UploaderBuilder

    Template(String)

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

    Declaration
    public UploaderBuilder Template(string template)
    Parameters
    Type Name Description
    System.String template
    Returns
    Type Description
    UploaderBuilder

    Uploading(String)

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

    Declaration
    public UploaderBuilder Uploading(string uploading)
    Parameters
    Type Name Description
    System.String uploading
    Returns
    Type Description
    UploaderBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved