Header missing when uploading files

Hi,

I'm using the FileManager exactly like this https://blazor.syncfusion.com/documentation/file-manager/how-to/customize-http-handler but it looks like when I try to upload a file, the token is not in the headers even though the OnBeforeSend event is correctly triggered.

The token is here on the first request to get the files, but not on upload.


Regards,

Julien


9 Replies 1 reply marked as answer

PS Praveen Sellappan Syncfusion Team April 13, 2026 02:46 PM UTC

Hi Julien,


Greetings from Syncfusion Support.


Based on the issue you reported, we prepared a sample using the File Manager component to replicate the behavior you mentioned. In this sample, we pass the authorization header for the upload operation and were able to successfully receive the header in the service.


We tested the sample using our latest Syncfusion version and the Edge browser. During testing, the authorization header was received correctly for the upload operation, and we did not encounter any issues while sending the headers. We have attached the tested sample for your reference. Kindly review it and ensure that the required configurations and changes are properly applied in your application to send the headers.


Additionally, we recently identified an internal issue related to passing headers to the service during the upload operation, and this has been resolved in our latest version. The fix is available starting from v31.2.15. If you are using a version earlier than this, we kindly request you to update to the latest version to access the fix. In our latest version, we did not observe any issues related to sending headers for the upload operation.


For your convenience, we have also shared our documentation on upgrading to the latest version.


Release history of Blazor components - Syncfusion


Code Snippet:


<SfFileManager TValue="FileManagerDirectoryContent">

   

    <FileManagerUploadSettings UploadMode="UploadMode.HttpClient"></FileManagerUploadSettings>

    <FileManagerEvents TValue="FileManagerDirectoryContent" OnSend="OnBeforeSend"></FileManagerEvents>

</SfFileManager>

public void OnBeforeSend(BeforeSendEventArgs args)

{

       

     args.HttpClientInstance.DefaultRequestHeaders.Authorization =

         new AuthenticationHeaderValue("Authorization", "User1");

}

 

Provider[Filemanagercontroller.cs]

 

public IActionResult Upload(string path, long size, IList<IFormFile> uploadFiles, string action)

{

     var header = HttpContext.Request.Headers["Authorization"];

     }


If you are still facing the issue after upgrading to the latest version, please share the following details, which will help us investigate further:


  • Your File Manager component configuration
  • The type of provider used (Syncfusion provider or custom provider)
    • If Syncfusion provider, please share the provider’s name
  • The environment in which the application is tested
  • Try reproducing the issue using the attached sample
  • If possible, share a minimum issue‑reproducible sample


We look forward to your response and will be happy to assist you further.


Regards,

Praveen Sellappan


Attachment: filesample_e0932cb5.zip


JB Julien Barach April 13, 2026 03:33 PM UTC

I'm on 33.1.45 so it's not about the package version.


I've figured out that it fails when there is an async call inside the OnBeforeSend method.
Here is how I need to set up the header :

args.HttpClientInstance.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", await _localStorage.GetItemAsync<string>("authToken"));


Again, this works when the FileManager gets the files, but not on uploads.


Regards,

Julien



PS Praveen Sellappan Syncfusion Team April 17, 2026 05:59 PM UTC

Hi Julien,


Based on the information provided, we have validated and classified the reported scenarios as a bug on our end. The fix for this issue will be included in the upcoming weekly release scheduled for May 5,2026. You can track the status of the fix at the following link:


Authorization Header Not Received During Upload Operation in Blazor FileManager Component in Blazor | Feedback Portal


Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


Regards,

Praveen



PS Praveen Sellappan Syncfusion Team May 6, 2026 12:35 AM UTC

Hi Julien,


We regret to inform you that we were unable to include the fix for the reported issue in the weekly patch release as previously communicated.


However, we are pleased to inform you that the fix has been planned for inclusion in our upcoming weekly patch release, scheduled for May 19, 2026.


Thank you for your patience and understanding.


Regards,

Praveen Sellappan




PS Praveen Sellappan Syncfusion Team May 26, 2026 03:09 PM UTC

Hi Julien,

 

Thanks for your patience.

  

The issue “Authorization Header Not Received During Upload Operation in Blazor FileManager Componenthas been resolved in this release. To access this fix, we suggest you update the package to the latest version (33.2.8). We have also included the sample in the main version for your reference.

 

Root cause: Windows Authentication automatically adds an authorization token, but an extra header was also being added, causing upload failures. Skipping the header fixed that issue but also prevented user‑provided tokens from being sent, leading to upload failures in custom scenarios.


Sample: Attached as Zip.

 

Feedback: Authorization Header Not Received During Upload Operation in Blazor FileManager Component in Blazor | Feedback Portal

 

Release Note: Essential Studio for Blazor Release Notes - v33.2.8

 

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

 

Regards,

Praveen Sellappan


Attachment: filesample_301adda2.zip

Marked as answer

JB Julien Barach July 14, 2026 02:47 PM UTC

Hi,


Looks like this bug is still there in v33.2.12.

I can't set the Bearer in the async OnBeforeSend methods.


Regards,

Julien



PS Praveen Sellappan Syncfusion Team July 23, 2026 12:01 PM UTC

Hi Julien,
Thank you for sharing the details.
Based on the information you provided, we tested the sample that we previously shared with you in both the issue-fixed version 33.2.8 and the version 33.2.12 mentioned in your latest update. During our testing, we were able to successfully receive the Authorization header in the service when it was sent from the client using the asynchronous method for upload operation.
We tested the sample multiple times in both versions; however, we were unable to reproduce the issue you described. In all our test runs, the Authorization header was passed and received as expected. We have attached the sample and a video for your reference.
We suspect that the problem may be related to either the browser cache or the NuGet cache, especially after updating to a newer version. To help resolve the issue, we recommend removing the bin and obj folders from your project, then rebuilding and clearing your browser cache.

To assist you in this process, we have attached a blog post that provides step-by-step instructions for clearing the cache.


Try out the shared details and let us know if you need any further assistance.

Regards,

Attachment: FileManagerSample_9aaa9e2d.zip


JB Julien Barach July 24, 2026 07:34 AM UTC

Hi,


On the version v34.1.31if the token contains a dot (e.g. "

eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiIyIiw

") then the header is totally removed.


Regards,

Julien



PS Praveen Sellappan Syncfusion Team July 27, 2026 02:56 PM UTC

Hi Julien,

Thank you for your patience and for sharing the details.
To better track and address the latest issue you reported regarding the authorization token not being received by the service when the token contains a dot, we have branched this issue into a separate forum thread. This dedicated thread will help us investigate and resolve the issue more efficiently.
Please use the following forum thread for future updates and communication related to this issue:
If you have any additional information or questions, please feel free to reach out through the forum thread linked above.
Regards,
Praveen

Loader.
Up arrow icon