fix error

This commit is contained in:
邱博亞 2023-05-19 21:13:13 +08:00
parent 034d08971a
commit 405f5aefbc
1 changed files with 1 additions and 1 deletions

View File

@ -666,7 +666,7 @@ class AnnouncementsController < ApplicationController
return
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)
return
end