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

MIME type detection breaks on some files #33

Open
corbindavenport opened this issue Dec 3, 2024 · 0 comments
Open

MIME type detection breaks on some files #33

corbindavenport opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@corbindavenport
Copy link
Owner

The uploaded MIME type for files isn't stored anywhere after upload, so if the MIME type can't be detected automatically by the mime library during the download request, the downloaded file can't be opened unless the user adds a file extension manually. This affects PICT screenshots uploaded through Internet Explorer on classic Mac OS, and possibly other use cases where a file extension is not provided.

ImageShare needs to store the MIME type as provided during upload alongside the file (probably in an array?), and then delete that when the image is deleted. Alternatively, a file extension from the MIME type could be added during the Multer upload function when the file is renamed, if an extension is not already present.

@corbindavenport corbindavenport added the bug Something isn't working label Dec 3, 2024
@corbindavenport corbindavenport self-assigned this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant