summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-12-12 14:56:53 +0000
committerGo MAEDA <maeda@farend.jp>2019-12-12 14:56:53 +0000
commitc7b6ed09f0fd77c98029f0a68e596c092b6129c3 (patch)
tree7df85b8e83ac1f70ee53176d50686ddfe52c977f
parent669c3c206b9f435cd639d308dfd31099fd8d1698 (diff)
downloadredmine-c7b6ed09f0fd77c98029f0a68e596c092b6129c3.tar.gz
redmine-c7b6ed09f0fd77c98029f0a68e596c092b6129c3.zip
Merged r19365 from trunk to 3.4-stable (#20277).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@19368 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/attachments_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 1b18662ad..64cb05eba 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -60,7 +60,7 @@ class AttachmentsController < ApplicationController
@attachment.increment_download
end
- if stale?(:etag => @attachment.digest)
+ if stale?(:etag => @attachment.digest, :template => false)
# images are sent inline
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
@@ -70,7 +70,7 @@ class AttachmentsController < ApplicationController
def thumbnail
if @attachment.thumbnailable? && tbnail = @attachment.thumbnail(:size => params[:size])
- if stale?(:etag => tbnail)
+ if stale?(:etag => tbnail, :template => false)
send_file tbnail,
:filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),