Fixed: No mime-types in documents/files downloading
git-svn-id: http://redmine.rubyforge.org/svn/trunk@898 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8a8f819d27
commit
843d04f0e3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue