Open ianchanning opened 1 year ago
Sorry, did not mean to close the PR.
please tell me what is the status of the task?
So, what do we need to do to add JFIF as an acceptable extension for image/jpeg?
So, what do we need to do to add JFIF as an acceptable extension for image/jpeg?
Something from IANA, Apache or NGINX that specifies JFIF as a mimetype. It seems that nothing from either JPEG group themselves or IANA specify it. If you need to have jfif specified as a mimetype you will have to look for other libraries that do things like sniffing the binary contents of the files.
... or request a new mime type: https://www.iana.org/form/media-types - I don't know the answers to all their questions.
So, what do we need to do to add JFIF as an acceptable extension for image/jpeg?
Something from IANA, Apache or NGINX that specifies JFIF as a mimetype. It seems that nothing from either JPEG group themselves or IANA specify it. If you need to have jfif specified as a mimetype you will have to look for other libraries that do things like sniffing the binary contents of the files.
Oh! But JFIF is not a mime type. Is an extension for image/jpeg
mime type. 🤷♂️
We're using a lib called mime-types (from jshttp
too) that try to find the file mime-type based on the file extension. This lib uses mime-db as a resource. So it fails!
I think I'll have to wrap the call of the lib to manage only this file extension 😞
jfif is the only one that I have actual files for, but for completeness based on https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types#jpeg_joint_photographic_experts_group_image I included jpe and jif.
Fix for #283