Project

General

Profile

Actions

Feature #15790

closed

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

Added by luigifab ! almost 11 years ago. Updated over 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 ! almost 11 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 almost 11 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 ! over 10 years ago

Wow, express!

Actions

Also available in: Atom PDF