We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

No CustomFormData property on UploadingEventArgs

Thread ID:

Created:

Updated:

Platform:

Replies:

146902 Aug 25,2019 12:22 AM UTC Aug 26,2019 09:17 AM UTC Blazor 1
loading
Tags: File Upload
John
Asked On August 25, 2019 12:22 AM UTC

Hi

Want to send additional data with uploaded file.   
Documentation for UploadingEventArgs shows a property CustomFormData but when attempting to use gives error that UploadingEventArgs does not contain a definition for it.

John

Gopi Govindasamy [Syncfusion]
Replied On August 26, 2019 09:17 AM UTC

Hi John,  

Greetings from Syncfusion support.  

We have provided support for “send additional data with upload files” and included in the below private NuGet package. The support will be include in our upcoming patch release which is scheduled on 28th August 2019. Until then, kindly use this below private NuGet for this support and utilize FileSelected event to send additional data (args.CustomFormData) as a key-value pair.  



Thanks for your patience and we will deliver the support to patch release as promised. 

Note: Clear NuGet cache and refer the local Nuget 

  1. Before install the NuGet, you must remove the bin and object folder in your application
  2. Tools -->options --> NuGet Package Manager --> General --> Clear All NuGet Caches
  3. Download the above NuGet packages
  4. Tools -->options --> NuGet Package Manager -->  Package Sources --> Click Add button --> browse the local package location --> click Update --> ok
  5. Right-click the project and select Manage NuGet Packages
  6. Select your private NuGet name and install the packages

Please find the sample and code snippet for your reference.  

@using Syncfusion.EJ2.Blazor 
@using Syncfusion.EJ2.Blazor.Inputs 
 
<h4>Upload Custom Header</h4> 
 
<EjsUploader> 
    <UploaderEvents FileSelected="OnFileSelect"></UploaderEvents> 
    <UploaderAsyncSettings SaveUrl="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.CustomFormData = new List<object> { new { Name = "Syncfusion" } }; 
    } 
} 

Output:  
 
 


Regards, 
Gopi G. 
 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon