Vote #74765
完了Use the mime-types gem to get mime type for unknown extension
0%
説明
@Redmine::MimeType.of('402388.webm')@
return nothing
According to "lib/redmine/mime_type.rb":/projects/redmine/repository/entry/trunk/lib/redmine/mime_type.rb, it's normal.
But, this mime type (ie, video/webm), like many others, exists, like for examples http://www.freeformatter.com/mime-types-list.html.
journals
Ok, I think this will problem take more than 3 years to resolve it.
Because => #4009 (2009-10-09) => #14206 (2013-06-04) => fixed 2013-07-13.
So, I think that the solution is to run _file_ command to determine file mimetype's:
_*file --brief --mime-type .../file.webm*_ => _video/webm_
--------------------------------------------------------------------------------
@Redmine::MimeType.of@ now uses the @mime-types@ gem for unknown extensions (r12483). The first type is returned when multiple types match the extension, @Redmine::MimeType.of('402388.webm')@ returns @audio/webm@.
--------------------------------------------------------------------------------
Wow, express!
--------------------------------------------------------------------------------