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),