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

Adding custom header to uploader request


I am using server-side Blazor with .net core 3.0 preview 6.
I am trying to add a custom header to the Uploader request via the OnUploadStart attribute.
In the OnUploadStart function it takes UploadingEventArgs as argument like so:

protected void AddTokens(UploadingEventArgs args)
    args.CurrentRequest.setRequestHeader("Authorization", "dummyUserName");

However, the above function does not work because the type of CurrentRequest is of object, and the underlying type is Newtonsoft.Json.Linq.JObject.
What is the correct way of setting a custom header for the uploader request?

Thank you,

Tony Wu.

1 Reply

GG Gopi Govindasamy Syncfusion Team July 10, 2019 05:45 AM UTC

Hi Tony,  

Sorry for the inconvenience. 

This was a known issue in our File uploader component. We are currently working on it and will include the fix in our upcoming release, which is expected to be rolled out by end of July 2019.  

Please find the feedback portal link to track this defect status.   

We appreciate your patience until then. 

Gopi G. 

Live Chat Icon For mobile
Up arrow icon