mime-types / mime-types-data

MIME Type registry data
Other
46 stars 31 forks source link

MIME::Types.type_for Does not Support JFIF Extension #51

Closed mohammedgad closed 1 year ago

mohammedgad commented 1 year ago

Hi! Recently I wanted to use MIME::Types.type_for to detect a file content type, but I receive nothing when I try to detect the content type of a JFIF file.

MIME::Types.type_for("something.jpeg")
=> [#<MIME::Type: image/jpeg>]
MIME::Types.type_for("something.jfif")
=> []

Expected result: This should return [#<MIME::Type: image/jpeg>]

Actual result: it returns an empty array

halostatue commented 1 year ago

MIME::Types returns data provided by mime-types-data. A pull request here to add jfif to image/jpeg (only in the images YAML file) would be accepted.

mohammedgad commented 1 year ago

Thank you @halostatue for your response! I am gonna open a PR shortly.