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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding custom header to uploader request

Thread ID:





145832 Jul 10,2019 01:11 AM UTC Jul 10,2019 05:45 AM UTC Blazor 1
Tags: File Upload
Asked On July 10, 2019 01:11 AM UTC


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.

Gopi Govindasamy [Syncfusion]
Replied On 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. 


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