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. Image for the cookie policy date

Send additional data with file upload

Hi, while using your file upload component for Blazor, how can I send additional data to the controller? For example, how to send a name value pair such as "name":"amjad" to the controller along with the file?


Thanks,

Amjad.


3 Replies

UD UdhayaKumar Duraisamy Syncfusion Team December 16, 2022 05:21 AM UTC

You can use CustomFormData which adds the additional data in key and value pair format that will be submitted to the upload action. Please refer to the below forum for more details.


API Reference : https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.UploadingEventArgs.html#Syncfusion_Blazor_Inputs_UploadingEventArgs_CustomFormData



Syncfusion Forum : https://www.syncfusion.com/forums/145921/how-to-pass-additional-parameters-at-file-upload?reply=NfE3iq



PG Peter Groft December 16, 2022 08:00 AM UTC

Adding input fields to the upload form.

Adding additional form data programmatically.

Setting formData on upload starts.

Setting formData on upload start for each individual file upload.

How to retrieve and set form data asynchronously.

Handling additional form data on server side.

PHP.


Regards,
Peter



UD UdhayaKumar Duraisamy Syncfusion Team December 20, 2022 06:02 AM UTC

Hi Peter,


We request you provide an exact requirement detail along with the use case scenario. So that we are able to validate the query further and provide you with a prompt solution.


Regards,

Udhaya Kumar D


Loader.
Up arrow icon