diff --git a/lib/redmine/mime_type.rb b/lib/redmine/mime_type.rb index 202c01e41..2bd396871 100644 --- a/lib/redmine/mime_type.rb +++ b/lib/redmine/mime_type.rb @@ -60,7 +60,7 @@ module Redmine extension = m[2].downcase @known_types ||= Hash.new do |h, ext| type = EXTENSIONS[ext] - type ||= MIME::Types.find {|type| type.extensions.include?(ext)}.to_s.presence + type ||= MIME::Types.type_for(ext).first.to_s.presence h[ext] = type end @known_types[extension]