Commit 619bde52 authored by jplang's avatar jplang

Always send images user-uploaded images with Content-Disposition: attachment (#24199).

Patch by Holger Just.

git-svn-id: https://svn.redmine.org/redmine/trunk@16285 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 5fe1b417
......@@ -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'
......
......@@ -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'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment