Project

General

Profile

Actions

Feature #15790

closed

Use the mime-types gem to get mime type for unknown extension

Added by luigifab ! about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Files
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Redmine::MimeType.of('402388.webm')
return nothing

According to 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.

Actions #1

Updated by luigifab ! about 10 years ago

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

Actions #2

Updated by Jean-Philippe Lang about 10 years ago

  • Tracker changed from Defect to Feature
  • Subject changed from Mime type of webm/ogv files to Use the mime-types gem to get mime type for unknown extension
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.0
  • Resolution set to Fixed

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.

Actions #3

Updated by luigifab ! almost 10 years ago

Wow, express!

Actions

Also available in: Atom PDF