diff options
author | Go MAEDA <maeda@farend.jp> | 2019-12-12 14:52:03 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-12-12 14:52:03 +0000 |
commit | 4e552b93e48dc8f8661f3a66b826057bdaee1c90 (patch) | |
tree | 6b57581271abad8ebcb166fdb973e0a3723fd151 /app | |
parent | a5e6be4d7043a3a2a311328f58cc1ec65be2d57e (diff) | |
download | redmine-4e552b93e48dc8f8661f3a66b826057bdaee1c90.tar.gz redmine-4e552b93e48dc8f8661f3a66b826057bdaee1c90.zip |
Merged r19365 from trunk to 4.1-stable (#20277).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19366 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/attachments_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index a46e551bf..4a880793e 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -70,7 +70,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), @@ -80,7 +80,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), |