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
Low - Affects a single feature with minimal user impact
Medium - Affects multiple features or has moderate user impact
High - Critical functionality or significant user impact
Reason for not identifying earlier
The issues are occurred only in specific scenario
Areas tested against this fix
Tested Conditions
Verified file upload works correctly with and without the Authorization header
Confirmed upload action functions properly in both FormSubmit and HttpClient modes.
Tested single and multiple file uploads with authorization enabled
Validated directory upload with authorization.
Ensured whether the chunck upload works properly with and without authoriization headers
Checked duplicate file uploads with KeepBoth, Skip, and Replace options
Attempted upload with an invalid issuer to ensure proper error handling
Verified upload behavior when AutoUpload and AutoClose are set to both true and false.
Tested upload with disallowed file extensions.
Ensured upload fails when role is set to user insist of admin
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
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
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?
Output screenshots
Before Fix:

After fix:

API changes
Performance verification
Reviewer Checklist