修復ie下載中文亂碼
This commit is contained in:
parent
dee431eedf
commit
151748bcb8
|
@ -665,7 +665,9 @@ class AnnouncementsController < ApplicationController
|
|||
render "archives/redirect_to_file.html",:layout=>false
|
||||
return
|
||||
else
|
||||
send_file(@path)
|
||||
user_agent = request.user_agent.downcase
|
||||
@escaped_file_name = user_agent.include?(/(msie|trident)/) ? CGI::escape(@filename) : @filename
|
||||
send_file(@path, :type=>"application/octet-stream", :filename => @escaped_file_name, :x_sendfile=> true)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue