]> source.dussan.org Git - redmine.git/commitdiff
Backported r16285 (#24199).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 29 Jan 2017 10:39:50 +0000 (10:39 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 29 Jan 2017 10:39:50 +0000 (10:39 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16295 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/attachments_controller.rb
app/controllers/repositories_controller.rb

index 6113957d4465d01ca4878057f673ddb3f9159bf7..c2b5fa9c84de4d284502b97744c09e910a92c07e 100644 (file)
@@ -57,7 +57,7 @@ class AttachmentsController < ApplicationController
       # images are sent inline
       send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
                                       :type => detect_content_type(@attachment),
-                                      :disposition => (@attachment.image? ? 'inline' : 'attachment')
+                                      :disposition => 'attachment'
     end
   end
 
index ded172a3669c9943575bb97432f2ea47d27b233b..9e03ab8ee32b2de4a1446093affabe432184713e 100644 (file)
@@ -177,7 +177,7 @@ class RepositoriesController < ApplicationController
       send_opt = { :filename => filename_for_content_disposition(@path.split('/').last) }
       send_type = Redmine::MimeType.of(@path)
       send_opt[:type] = send_type.to_s if send_type
-      send_opt[:disposition] = (Redmine::MimeType.is_type?('image', @path) && !is_raw ? 'inline' : 'attachment')
+      send_opt[:disposition] = 'attachment'
       send_data @content, send_opt
     else
       # Prevent empty lines when displaying a file with Windows style eol