summaryrefslogtreecommitdiffstats
path: root/app/controllers/repositories_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-29 08:03:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-29 08:03:26 +0000
commit34c5b51cf095ddff2f38c44920ecdf428a6fb0b8 (patch)
tree05a5e78d79f1a1b8286e5211823aa465ff1a83d7 /app/controllers/repositories_controller.rb
parent868f83fe357ebecdcf466173c809038a3b093742 (diff)
downloadredmine-34c5b51cf095ddff2f38c44920ecdf428a6fb0b8.tar.gz
redmine-34c5b51cf095ddff2f38c44920ecdf428a6fb0b8.zip
Always send images user-uploaded images with Content-Disposition: attachment (#24199).
Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@16285 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/repositories_controller.rb')
-rw-r--r--app/controllers/repositories_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index b073d8c5a..eeb2bced7 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -430,7 +430,7 @@ class RepositoriesController < ApplicationController
end
def disposition(path)
- if Redmine::MimeType.is_type?('image', @path) || Redmine::MimeType.of(@path) == "application/pdf"
+ if Redmine::MimeType.of(@path) == "application/pdf"
'inline'
else
'attachment'