diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 2851f91a..c10834c1 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -35,7 +35,9 @@ class AttachmentsController < ApplicationController end def download - @attachment.increment_download if @attachment.container.is_a?(Version) + if @attachment.container.is_a?(Version) || @attachment.container.is_a?(Project) + @attachment.increment_download + end # images are sent inline send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),