Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FileUploadStartEventArgs.RequestData Property

Specifies the upload request’s custom data.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public Dictionary<string, object> RequestData { get; set; }

#Property Value

Type Description
Dictionary<String, Object>

A dictionary that contains the request’s custom data.

#Remarks

Handle the FileUploadStart event to control file upload before it is started. Use the event argument’s RequestHeaders and RequestData properties to specify headers and custom data for the upload request.

The following snippet adds an authentication token and username to the request and gets their values in the server-side controller.

<DxUpload Name="myFile" UploadUrl="https://localhost:10000/api/Upload/Upload/" 
          FileUploadStart="@OnFileUploadStart">
</DxUpload>

@code {
    void OnFileUploadStart(FileUploadStartEventArgs e) {
        e.RequestHeaders.Add("AuthHeader", "MySecretToken");
        e.RequestData.Add("Username", "MyUsername");
    }
}
See Also