Skip to content
Snippets Groups Projects
Commit 843d04f0 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang
Browse files

Fixed: No mime-types in documents/files downloading

git-svn-id: http://redmine.rubyforge.org/svn/trunk@898 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 8a8f819d
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment