Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145921 | Jul 13,2019 01:39 PM UTC | Jun 16,2020 10:56 AM UTC | Blazor | 8 |
![]() |
Tags: File Upload |
@using Syncfusion.EJ2.Blazor
@using Syncfusion.EJ2.Blazor.Inputs
<h4> Upload custom header </h4>
<EjsUploader>
<UploaderEvents FileSelected="OnFileSelect"></UploaderEvents>
<UploaderAsyncSettingsSaveUrl ="https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save" RemoveUrl="https://aspnetmvc.syncfusion.com/services/api/uploadbox/Remove"> </UploaderAsyncSettings>
</EjsUploader>
@code{
public void OnFileSelect(SelectedEventArgs args)
{
args.CurrentRequest = new List<object> { new { custom - header = "Syncfusion" } };
}
} |
@using Syncfusion.Blazor.Inputs
<SfUploader ID="UploadFiles">
<UploaderEvents FileSelected="onFileSelect"></UploaderEvents>
<UploaderAsyncSettings SaveUrl="api/SampleData/Save">
</UploaderAsyncSettings>
</SfUploader>
@code {
private void onFileSelect(SelectedEventArgs args)
{
args.CustomFormData = new List<object> { new { Name = "Syncfusion" } };
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.