Skip to content

[NO-JIRA] Fix HEIC file upload validation on Windows#214

Open
cloakedj wants to merge 2 commits intostagefrom
heic-windows-fix
Open

[NO-JIRA] Fix HEIC file upload validation on Windows#214
cloakedj wants to merge 2 commits intostagefrom
heic-windows-fix

Conversation

@cloakedj
Copy link
Copy Markdown
Collaborator

@cloakedj cloakedj commented Mar 12, 2026

Summary

Fix HEIC file upload validation on Windows browsers where the MIME type is not correctly reported. Added isWindows() utility function and enhanced HEIC input validation to fall back to file extension checking when MIME type is empty on Windows.


Jira Ticket

Resolves: MWPW-NUMBER


Test URLs

Env URL
Before https://main--da-express-milo--adobecom.aem.page/express/feature/image/convert/heic-to-jpg
After https://heic-windows-fix--da-express-milo--adobecom.aem.page/express/feature/image/convert/heic-to-jpg?martech=off

Verification Steps

  1. Navigate to a HEIC conversion quick action page (e.g., /express/feature/image/convert/heic-to-jpg or /express/feature/image/convert/heic-to-png)
  2. Upload a .heic file using the file picker or drag-and-drop
  3. Before: On Windows, HEIC files may be rejected with "file type not supported" error because the browser reports an empty MIME type
  4. After: HEIC files are correctly accepted on Windows by falling back to file extension validation

Test Scenarios

Scenario Expected Behavior Browser/OS
Upload .heic file via picker File accepted, conversion starts Chrome/Windows
Upload .heic file via drag-drop File accepted, conversion starts Chrome/Windows
Upload .heic file File accepted (existing behavior) Chrome/macOS
Upload .png/.jpg file File accepted Any
Upload unsupported file (.pdf) Error shown Any

Regression Test - Random Quick Actions

Validate that the following quick actions still work as expected after this change:

Quick Action Test URL File Type Expected Behavior
Convert to JPG https://heic-windows-fix--da-express-milo--adobecom.aem.page/express/feature/image/convert/jpg?martech=off .png, .webp File uploads and converts to JPG successfully
Resize Image https://heic-windows-fix--da-express-milo--adobecom.aem.page/express/feature/image/resize?martech=off .jpg, .png File uploads and resize options appear
Convert to PNG https://heic-windows-fix--da-express-milo--adobecom.aem.page/express/feature/image/convert/png?martech=off .jpg, .webp File uploads and converts to PNG successfully

Potential Regressions

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Mar 12, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@github-actions github-actions Bot added the Ready for Review Ready for peer review. label Mar 12, 2026
@nateyolles nateyolles added this to the Express-26.12 milestone Mar 12, 2026
@hadobe
Copy link
Copy Markdown
Contributor

hadobe commented Mar 26, 2026

@cloakedj

I'm getting the "File not supported..." error when uploading the .heic file (Windows 11 / Chrome)

https://jira.corp.adobe.com/browse/MWPW-190912

@hadobe
Copy link
Copy Markdown
Contributor

hadobe commented Apr 7, 2026

@nateyolles
Copy link
Copy Markdown
Contributor

Waiting on @cloakedj for fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants