##// 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 219 end
220 220
221 221 def disposition(attachment)
222 if attachment.is_image? || attachment.is_pdf?
222 if attachment.is_pdf?
223 223 'inline'
224 224 else
225 225 'attachment'
@@ -430,7 +430,7 class RepositoriesController < ApplicationController
430 430 end
431 431
432 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 434 'inline'
435 435 else
436 436 'attachment'
General Comments 0
You need to be logged in to leave comments. Login now