プロジェクト

全般

プロフィール

Vote #74765

完了

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

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Files_52
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
52
version_id:
75
issue_org_id:
15790
author_id:
45875
assigned_to_id:
1
comments:
3
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

@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!
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリFiles_52 にセット
  • 対象バージョン2.5.0_75 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0