修復ie下載中文亂碼
This commit is contained in:
1 parent
dee431eedf
commit
151748bcb8
1 file changed
+3
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user