Skip to content

fix: empty mimeType error on Windows #1141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged

fix: empty mimeType error on Windows #1141

merged 1 commit into from
Jun 11, 2025

Conversation

toshikwa
Copy link
Collaborator

Description of Changes

In certain environments (e.g., Windows Chrome), file.type returns an empty string, causing invalid mimeType error.

This PR implements two fixes:

  • Added custom extension-to-mimeType mapping instead of relying on file.type
  • Implemented fallback for empty mimeType for backward compatibility

Checklist

  • Modified relevant documentation
  • Verified operation in local environment
  • Executed npm run cdk:test and if there are snapshot differences, execute npm run cdk:test:update-snapshot to update snapshots

Related Issues

#1139

@tbrand tbrand merged commit a23e803 into main Jun 11, 2025
2 checks passed
@tbrand tbrand deleted the fix/mimetype-windows branch June 11, 2025 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants