989384: Authorization not working for Blazor File Manager component upload operation#5
Closed
ArulmozhiSF4964 wants to merge 2 commits intomasterfrom
Closed
989384: Authorization not working for Blazor File Manager component upload operation#5ArulmozhiSF4964 wants to merge 2 commits intomasterfrom
ArulmozhiSF4964 wants to merge 2 commits intomasterfrom
Conversation
Indhumathy-Loganathan
approved these changes
Nov 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug description
989384 - Authorization not working for Blazor File Manager component upload operation.
Root cause
CORS origin restriction caused preflight requests to fail with 401 Unauthorized and Duplicate Authorization headers were being added: one from the HttpClient instance and another from GetCustomHeaders and facing an issue during chunck upload due to JWT sample provider lacked chunk-aware upload handling, so each chunk was treated as a full upload.
Solution description
Updated the CORS policy in Program.cs by correcting the AddPolicy syntax, moving UseCors before authentication/authorization, and replacing UseEndpoints with MapControllers. Additionally, fixed the duplicate header issue in GetCustomHeaders by skipping the Authorization header when building custom header, Implemented chunk-aware upload in the JWT PhysicalFileProvider by porting the logic from ej2-aspcore-fileprovider PhysicalFileProvider.cs
Impact assessment
Reason for not identifying earlier
The issues are occurred only in specific scenario
Areas tested against this fix
Tested Conditions
Breaking changes
breaking-issue)If yes, provide breaking commit details link and migration guidance.
https://gitea.syncfusion.com/essential-studio/ej2-blazor-source/pulls/24031
Regression testing
Action taken to prevent recurrence
Automation status
Cross-platform verification
Related issues
Is this issue present in EJ2 or other components?
needs-attention-coreteam)Output screenshots
Before Fix:

After fix:

API changes
Performance verification
Reviewer Checklist