summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-11-12 15:13:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-11-12 15:13:42 +0000
commit843d04f0e3fa0f841dd4db68262a130714443a0a (patch)
treebcde8c572d516df8adadf176b553f3426d5984de
parent8a8f819d273e25fa28fb492da92125fb06d1ab01 (diff)
downloadredmine-843d04f0e3fa0f841dd4db68262a130714443a0a.tar.gz
redmine-843d04f0e3fa0f841dd4db68262a130714443a0a.zip
Fixed: No mime-types in documents/files downloading
git-svn-id: http://redmine.rubyforge.org/svn/trunk@898 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/documents_controller.rb2
-rw-r--r--app/controllers/versions_controller.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb
index 442a6a288..63ee96134 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 f19dcda9c..4e9016ebf 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