diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-04 09:32:05 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-04 09:32:05 +0000 |
commit | 400e1ca2ffffa9f2d4383e30c8c2c0e0b02c964b (patch) | |
tree | 1340bca4491732e86abb8f22039c1673292f6945 /app/models | |
parent | cff50a591533bcc66588baaa555bb2790cc6d9fc (diff) | |
download | redmine-400e1ca2ffffa9f2d4383e30c8c2c0e0b02c964b.tar.gz redmine-400e1ca2ffffa9f2d4383e30c8c2c0e0b02c964b.zip |
Attachment preview does not work for some source files such as JavaScript and Go (#29259).
Patch by Go MAEDA with the help of Stephan Wenzel's contribution.
git-svn-id: http://svn.redmine.org/redmine/trunk@18122 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/attachment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 45560d0dc..362ac1fde 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -237,7 +237,7 @@ class Attachment < ActiveRecord::Base end def is_text? - Redmine::MimeType.is_type?('text', filename) + Redmine::MimeType.is_type?('text', filename) || Redmine::SyntaxHighlighting.filename_supported?(filename) end def is_image? |