menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class UploadingEventArgs - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class UploadingEventArgs

    Provides information about the OnChunkUploadStart and OnUploadStart events callback.

    Inheritance
    System.Object
    UploadingEventArgs
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class UploadingEventArgs : Object
    Remarks

    This event is triggered when file upload operations begin, either for individual chunks (in chunk-based uploads) or entire files. It provides comprehensive information about the upload process, including cancellation options, request customization, and chunk-specific details. This event enables developers to implement custom upload logic, authentication, and progress tracking before the actual upload begins.

    Constructors

    UploadingEventArgs()

    Declaration
    public UploadingEventArgs()

    Properties

    Cancel

    Gets or sets a value indicating whether the file upload action has been canceled.

    Declaration
    public bool Cancel { get; set; }
    Property Value
    Type Description
    System.Boolean

    true to cancel the file upload operation; otherwise, false.

    Remarks

    Setting this property to true will prevent the file upload operation from proceeding. This allows for conditional uploads based on custom validation, authentication checks, or other business logic requirements that may be evaluated at upload start.

    ChunkSize

    Gets or sets the size of the chunk being uploaded in bytes.

    Declaration
    public double ChunkSize { get; set; }
    Property Value
    Type Description
    System.Double

    A double value representing the chunk size in bytes.

    Remarks

    This property specifies the size of the individual chunk that is being uploaded when chunk-based upload is enabled. For non-chunked uploads, this may represent the entire file size. The chunk size is configured in the uploader settings and determines how large files are split for sequential upload operations.

    CurrentChunkIndex

    Gets or sets the index of the current chunk being uploaded when chunk upload is enabled.

    Declaration
    public double CurrentChunkIndex { get; set; }
    Property Value
    Type Description
    System.Double

    A double value representing the zero-based index of the current chunk being uploaded.

    Remarks

    This property identifies the specific chunk within a file that is currently being uploaded when chunk-based upload is enabled. It provides precise information about upload progress and helps track which portion of the file is being processed. For non-chunked uploads, this value is typically zero.

    CurrentRequest

    Gets or sets the XMLHttpRequest instance associated with the upload action.

    Declaration
    public object CurrentRequest { get; set; }
    Property Value
    Type Description
    System.Object

    An object containing XMLHttpRequest details, or null if no request is associated.

    Remarks

    This property provides access to the underlying HTTP request object that will be used for the file upload operation. It allows for customization of request headers, authentication tokens, and other HTTP-specific settings before the upload request is sent to the server.

    CustomFormData

    Gets or sets additional custom data in key-value pair format to be submitted with the upload action.

    Declaration
    public object CustomFormData { get; set; }
    Property Value
    Type Description
    System.Object

    An object containing key-value pairs of additional data, or null if no custom data is provided.

    Remarks

    This property allows developers to include additional parameters or metadata with the upload request. Common uses include authentication tokens, user identifiers, file categories, or other application-specific data required by the server-side upload handler for proper file processing.

    FileData

    Gets or sets the details of the file that will be uploaded.

    Declaration
    public FileInfo FileData { get; set; }
    Property Value
    Type Description
    FileInfo

    A FileInfo object containing comprehensive file details, or null if no file information is available.

    Remarks

    This property contains detailed information about the file being uploaded, including file name, size, type, and current upload status. This information is essential for implementing custom upload logic, validation, and progress tracking during the upload operation.

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