Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Missing extensions #1

Closed
florent opened this issue Oct 25, 2010 · 1 comment
Closed

Missing extensions #1

florent opened this issue Oct 25, 2010 · 1 comment

Comments

@florent
Copy link

florent commented Oct 25, 2010

Hi,

I have an issue with some content types which don't always return an extension. My example is "video/mp4", which has no extension although the RFC (RFC4337) lists both "mp4" and "mpg4" as registered extensions.
My use case is: I download an attachment with an "obscured" URL (like "test.com/videos/sha1"), and I use a mime-type to help build a file name.
I don't know if all mime-types are supposed to have 1+ extension (ex: H264), but there are some which obviously miss an extension (at least, that's what I understand). If intentional, should I work with the mime-type's sub_type to choose a file extension is the library doens't provide an extension?

Thanks,
Florent.

@halostatue
Copy link
Member

Not all MIME types have an extension because of a lack of information. Contributions to fix this matter are always welcome. Per RFC4337, I will be pushing 1.17 soon that adds .mp4 and .mpg4 for application/mp4, audio/mp4, and video/mp4.

jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this issue Dec 9, 2013
== MIME::Types 1.17.2 / 2011-10-25
* Bug Fixes:
  * Fixed an issue with Ruby 1.9 and file encoding.

== MIME::Types 1.17.1 / 2011-10-23
* Minor Enhancements:
  * Implemented modern 'hoe' semantics.
  * Switched to minitest instead of test/unit.
  * Converted documentation from .txt to .rdoc.
  * Removed setup.rb. (Issue #3:
    mime-types/ruby-mime-types#3).
  * Should no longer complain about missing RubyGems keys (Issue #2:
    mime-types/ruby-mime-types#2).
  * Added .mp4 and .mpg4 as recognized extensions for
    {application,audio,video}/mp4 per RFC4337. (Issue #1:
    mime-types/ruby-mime-types#1).
  * Added audio/x-aac and .aac per RubyForge issue #28054
    (http://rubyforge.org/tracker/index.php?func=detail&aid=28054&group_id=293&atid=1194).
  * Made it much easier to update MIME types from this point forward.
  * Updated MIME types from IANA.
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
== MIME::Types 1.17.2 / 2011-10-25
* Bug Fixes:
  * Fixed an issue with Ruby 1.9 and file encoding.

== MIME::Types 1.17.1 / 2011-10-23
* Minor Enhancements:
  * Implemented modern 'hoe' semantics.
  * Switched to minitest instead of test/unit.
  * Converted documentation from .txt to .rdoc.
  * Removed setup.rb. (Issue #3:
    mime-types/ruby-mime-types#3).
  * Should no longer complain about missing RubyGems keys (Issue #2:
    mime-types/ruby-mime-types#2).
  * Added .mp4 and .mpg4 as recognized extensions for
    {application,audio,video}/mp4 per RFC4337. (Issue #1:
    mime-types/ruby-mime-types#1).
  * Added audio/x-aac and .aac per RubyForge issue #28054
    (http://rubyforge.org/tracker/index.php?func=detail&aid=28054&group_id=293&atid=1194).
  * Made it much easier to update MIME types from this point forward.
  * Updated MIME types from IANA.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants