Fix filename for IE.
This commit is contained in:
parent
abd411a118
commit
612c4ae4a1
|
@ -227,7 +227,9 @@ class ArchivesController < ApplicationController
|
|||
if (current_site.accessibility_mode rescue false)
|
||||
render "redirect_to_file",:layout=>false
|
||||
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)
|
||||
end
|
||||
end
|
||||
rescue
|
||||
|
|
Loading…
Reference in New Issue