JavaScript attachment should act as text?
Added by Wataru Hirayama over 10 years ago
Currently JavaScript attachment is not recognized as "text" but "application/javascript", so maginifier icon is not shown and cannot view the content.
Of course its official mime type is "application/javascript," but its content is clearly "text", it should act as text at least on redmine's pages.
The quick hack is:
--- a/lib/redmine/mime_type.rb
+++ b/lib/redmine/mime_type.rb
@@ -44,7 +44,8 @@
'image/x-ms-bmp' => 'bmp',
'image/x-xpixmap' => 'xpm',
'image/svg+xml'=> 'svg',
- 'application/javascript' => 'js',
+ 'text/x-javascript' => 'js',
'application/pdf' => 'pdf',
'application/rtf' => 'rtf',
'application/msword' => 'doc',
But this also effects for downloading. It's no good.
What's the best solution?