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

Why does file-type's fileTypeFromBuffer return different outputs for SVG files? #630

Closed
anumysore5 opened this issue Feb 21, 2024 · 1 comment

Comments

@anumysore5
Copy link

I am aware that the file-type README says that it doesn't support SVG files. Based on this, I would expect that any SVG file input to fileTypeFromBuffer would return undefined. But I am seeing some inconsistent behavior for different SVG file inputs.

For example, the output for this SVG file is undefined as expected. However for this SVG file, fileTypeFromBuffer returns { ext: "xml", mime: "application/xml" }

Could you please let me know why there is such discrepancy in the outputs?

@Borewit
Copy link
Collaborator

Borewit commented Apr 25, 2024

SVG is XML. That is as far file-type goes.

@Borewit Borewit closed this as completed Apr 25, 2024
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

No branches or pull requests

2 participants