##// END OF EJS Templates
Always send images user-uploaded images with Content-Disposition: attachment (#24199)....
Jean-Philippe Lang -
r15903:34c5b51cf095
parent child
Show More
@@ -219,7 +219,7 class AttachmentsController < ApplicationController
219 end
219 end
220
220
221 def disposition(attachment)
221 def disposition(attachment)
222 if attachment.is_image? || attachment.is_pdf?
222 if attachment.is_pdf?
223 'inline'
223 'inline'
224 else
224 else
225 'attachment'
225 'attachment'
@@ -430,7 +430,7 class RepositoriesController < ApplicationController
430 end
430 end
431
431
432 def disposition(path)
432 def disposition(path)
433 if Redmine::MimeType.is_type?('image', @path) || Redmine::MimeType.of(@path) == "application/pdf"
433 if Redmine::MimeType.of(@path) == "application/pdf"
434 'inline'
434 'inline'
435 else
435 else
436 'attachment'
436 'attachment'
General Comments 0
You need to be logged in to leave comments. Login now