1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-03 23:53:23 +00:00

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
This commit is contained in:
Jean-Philippe Lang 2017-01-29 08:03:26 +00:00
parent 868f83fe35
commit 34c5b51cf0
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ class AttachmentsController < ApplicationController
end
def disposition(attachment)
if attachment.is_image? || attachment.is_pdf?
if attachment.is_pdf?
'inline'
else
'attachment'

View File

@ -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'