From 843d04f0e3fa0f841dd4db68262a130714443a0a 2007-11-12 15:13:42 From: Jean-Philippe Lang Date: 2007-11-12 15:13:42 Subject: [PATCH] Fixed: No mime-types in documents/files downloading git-svn-id: http://redmine.rubyforge.org/svn/trunk@898 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 442a6a2..63ee961 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -39,7 +39,7 @@ class DocumentsController < ApplicationController def download @attachment = @document.attachments.find(params[:attachment_id]) @attachment.increment_download - send_file @attachment.diskfile, :filename => @attachment.filename + send_file @attachment.diskfile, :filename => @attachment.filename, :type => @attachment.content_type rescue render_404 end diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index f19dcda..4e9016e 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -39,7 +39,7 @@ class VersionsController < ApplicationController def download @attachment = @version.attachments.find(params[:attachment_id]) @attachment.increment_download - send_file @attachment.diskfile, :filename => @attachment.filename + send_file @attachment.diskfile, :filename => @attachment.filename, :type => @attachment.content_type rescue render_404 end