summaryrefslogtreecommitdiffstats
path: root/app/controllers/attachments_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-19 17:46:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-19 17:46:24 +0000
commit0b04de0a23e2b9ce991cb06d2a1788ef0cc834cf (patch)
tree73cc653fdd73641cda63442ade889ef89d869892 /app/controllers/attachments_controller.rb
parentd750c9906ef7ad35abae516d3a39dee073b7b2d0 (diff)
downloadredmine-0b04de0a23e2b9ce991cb06d2a1788ef0cc834cf.tar.gz
redmine-0b04de0a23e2b9ce991cb06d2a1788ef0cc834cf.zip
Send a better content type than application/octet-stream (#19131).
git-svn-id: http://svn.redmine.org/redmine/trunk@14034 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/attachments_controller.rb')
-rw-r--r--app/controllers/attachments_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 4edcc0a41..9d3f7d75c 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -183,7 +183,7 @@ class AttachmentsController < ApplicationController
def detect_content_type(attachment)
content_type = attachment.content_type
- if content_type.blank?
+ if content_type.blank? || content_type == "application/octet-stream"
content_type = Redmine::MimeType.of(attachment.filename)
end
content_type.to_s