From 225066bbea83c9eb47757e20d6368988d0887018 Mon Sep 17 00:00:00 2001 From: junyi Date: Wed, 15 Jul 2026 10:45:53 +0000 Subject: [PATCH] remove accessibility_mode redirect page in download_file, download directly --- app/controllers/archives_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 84b351f..42fa009 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -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