Skip to content
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

fix: FileSave now respects file extensions in windows #7860

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

unpervertedkid
Copy link

@unpervertedkid unpervertedkid commented Apr 6, 2024

Description

This pull request addresses the issue where the fileSave function in the browser-fs-access library does not respect the extensions option. This issue has been previously noted in #113 . This caused issues with saving file after renaming where a user would expect it to retain the correct extension but did not as shown in the before video below.

The issue has also been noted in issue #7762

Note

  • I experienced and tested this issue on Windows (ms edge-123.0.2420.81 and chrome-123.0.6312.106 and I don't know if it affects other platforms.

Fix

The fix involves adding mimeTypes to the fileSave function, which ensures that the correct file type is suggested in the save dialog.

Comparison

Before.mp4
After.mp4

Copy link

vercel bot commented Apr 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Apr 6, 2024 10:39am
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Apr 6, 2024 10:39am
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Apr 6, 2024 10:39am
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Apr 6, 2024 10:39am

@unpervertedkid unpervertedkid changed the title Fix: FileSave now respects file extensions Fix: FileSave now respects file extensions in windows Apr 7, 2024
@unpervertedkid unpervertedkid changed the title Fix: FileSave now respects file extensions in windows fix: FileSave now respects file extensions in windows Apr 7, 2024
Copy link
Member

@ryan-di ryan-di left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fix!

@unpervertedkid
Copy link
Author

@ryan-di do i need more approvals for the pending checks to be run?

@ryan-di
Copy link
Member

ryan-di commented Apr 19, 2024

@ryan-di do i need more approvals for the pending checks to be run?

running now, apologize for the delay!

@unpervertedkid
Copy link
Author

@ryan-di do i need more approvals for the pending checks to be run?

running now, apologize for the delay!

No worries, all good now...

@unpervertedkid
Copy link
Author

@ryan-di I belive we can get this merged?
Hopefully?

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.

None yet

2 participants