remove accessibility_mode redirect page in download_file, download directly

This commit is contained in:
junyi 2026-07-15 10:45:53 +00:00
parent 7e691e6927
commit 225066bbea
1 changed files with 4 additions and 4 deletions

View File

@ -226,9 +226,9 @@ class ArchivesController < ApplicationController
#if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf"
#render "download_file",:layout=>false
#else
if (current_site.accessibility_mode rescue false)
render "redirect_to_file",:layout=>false
else
#if (current_site.accessibility_mode rescue false)
# render "redirect_to_file",:layout=>false
#else
user_agent = request.user_agent.downcase
@escaped_file_name = user_agent.match(/(msie|trident)/) ? CGI::escape(@filename) : @filename
if @ext == "pdf"
@ -236,7 +236,7 @@ class ArchivesController < ApplicationController
else
send_file(@path, :type => "application/octet-stream", :filename => @escaped_file_name, :x_sendfile => true)
end
end
#end
#end
rescue
redirect_to @url