Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class BeforeDownloadEventArgs<TValue>

    Show / Hide Table of Contents

    Class BeforeDownloadEventArgs<TValue>

    Represents the class for BeforeDownload event arguments.

    Inheritance
    System.Object
    BeforeDownloadEventArgs<TValue>
    Namespace: Syncfusion.Blazor.FileManager
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class BeforeDownloadEventArgs<TValue> : Object
    Type Parameters
    Name Description
    TValue

    Specifies the TValue of the FileManager.

    Remarks

    The Download operation is handled by using form submit and not by using Http request, so it is not possible to pass the HttpClientInstance here. However, you can send custom values from client to server for Download operation by preventing our default download operation using args.Cancel in BeforeDownload event. Then you can trigger the customized download operation using an interop call where you can pass custom values to server side.

    Constructors

    BeforeDownloadEventArgs()

    Declaration
    public BeforeDownloadEventArgs()

    Properties

    Cancel

    'true' if the download operation must be cancelled. Otherwise,false.

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

    This allows the users to cancel the download of specific files or folders in required cases.

    DownloadData

    Gets or sets the data to be sent to the server when downloading files from the FileManager.

    Declaration
    public DownloadData<TValue> DownloadData { get; set; }
    Property Value
    Type Description
    DownloadData<TValue>
    Remarks

    The DownloadData<TValue> class encapsulates the data required to perform a download operation on the FileManager. This property should be set to an instance of the DownloadData<TValue> class that specifies the file(s) to be downloaded, as well as any additional parameters that may be required by the server. When this property is set, the FileManager will send a request to the server to initiate the download. The server should respond with the requested file(s) in the appropriate format (e.g., as a byte array or as a file stream). The FileManager will then download the file(s) and provide them to the user for download.

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