Need a sample for the Form Support in FileUpload control

Hi,

I have two separate upload controls on my form, to upload a png photo and a pdf resume. There are a few other fields on the form

I want to use the Form Support in FileUpload control. I got the documentation for this at https://ej2.syncfusion.com/aspnetcore/documentation/uploader/form-support/
but this does not explain how to access the file bytes in the onPost.

Is there a ASP.Net Core Razor Pages sample available.

Thanks
Avinash Tauro




5 Replies 1 reply marked as answer

BC Berly Christopher Syncfusion Team June 16, 2021 11:05 AM UTC

Hi Avinash, 
  
Greetings from Syncfusion support. 
  
We can get the file bytes in the post action of the Uploader component from the file receiving arguments as mentioned below. 
  
 
  
For your convenience, we have prepared the sample and attached it below. 
  
Regards, 
Berly B.C 



AV Avinash June 17, 2021 05:08 AM UTC

Hi,
Thanks for the reply.

However this example is the standard example available in the documentation with autoUpload=true.

I need an example with Form support i.e. autoUpoad=false and SaveUrl/RemoveUrl = null

The files should be available in the form Post handler.

Also this sample is for .NET Core 2.0. Please share sample for .NET Core 3.1 or 5.0, if possible

Thanks
Avinash Tauro


SN Sevvandhi Nagulan Syncfusion Team June 17, 2021 12:31 PM UTC

Hi Avinash, 
 
 
We prepared the sample sample with requested requirment and attached it below for your reference. Please refer the below screenshot and sample. 
 
 
 
Please find the sample below. 
 
 
Kindly get back to us for further assistance. 
 
Regards, 
Sevvandhi N 


Marked as answer

AV Avinash June 18, 2021 02:17 AM UTC

Thanks for the sample. It works fine.


BC Berly Christopher Syncfusion Team June 18, 2021 05:04 AM UTC

Hi Avinash, 
  
Most welcome. Please let us know if you need further assistance on this. 
  
Regards, 
Berly B.C 


Loader.
Up arrow icon