How to use CustomFormData on BeforeUploadEventArgs

Hi,

Is there anywhere some example code for using the CustomFormData on BeforeUploadEventArgs

The API documentation says that this is an object which is key value pairs.

I have tried adding an object like this:

    public void BeforeUpload(BeforeUploadEventArgs args)
    {
        Guid localId = Guid.NewGuid();
        args.CustomFormData = new {Id = localId, Message = "Custom Message" };
    }

However, I'm not sure this is getting posted along with the file upload as I am unable to see it in the request and I cannot access this data on the server side.

Do you have an example of how this should be implemented?

Many thanks,

Tim

2 Replies

KA Kaine March 8, 2021 01:25 PM UTC

Apologies - I have found the information in another thread here:

https://www.syncfusion.com/forums/145921/how-to-pass-additional-parameters-at-file-upload



BC Berly Christopher Syncfusion Team March 9, 2021 05:41 AM UTC

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


Loader.
Up arrow icon