fix type error

This commit is contained in:
邱博亞 2023-03-27 22:42:13 +08:00
parent 612c4ae4a1
commit 2ad246df2a
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ class ArchivesController < ApplicationController
render "redirect_to_file",:layout=>false
else
user_agent = request.user_agent.downcase
@escaped_file_name = user_agent.include?(/(msie|trident)/) ? CGI::escape(@filename) : @filename
@escaped_file_name = user_agent.match(/(msie|trident)/) ? CGI::escape(@filename) : @filename
send_file(@path, :type=>"application/octet-stream", :filename => @escaped_file_name, :x_sendfile=> true)
end
end