diff options
author | Go MAEDA <maeda@farend.jp> | 2019-12-12 14:32:25 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-12-12 14:32:25 +0000 |
commit | 92232cc602f7f5d4a783c118bf74d367eb1fc1df (patch) | |
tree | 78c48ba81a8d8a6f6d27d625c8f6e94f192da19d /app | |
parent | e2ed6f27b6f151bc3a4ce2ce482f00729976da4c (diff) | |
download | redmine-92232cc602f7f5d4a783c118bf74d367eb1fc1df.tar.gz redmine-92232cc602f7f5d4a783c118bf74d367eb1fc1df.zip |
Fix "Couldn't find template for digesting" error in the log when sending an attachment or thumbnail (#20277).
Patch by Olivier Houdas.
git-svn-id: http://svn.redmine.org/redmine/trunk@19365 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), |