diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 237cdd7..76c2abd 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -653,9 +653,9 @@ class AnnouncementsController < ApplicationController @path = file.file.path rescue "" @filename = @path.split("/").last @ext = @path.split("/").last.to_s.split(".").last - if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf" - render "archives/download_file.html",:layout=>false - else + # if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf" + # render "archives/download_file.html",:layout=>false + # else if (current_site.accessibility_mode rescue false) render "archives/redirect_to_file.html",:layout=>false return @@ -665,7 +665,7 @@ class AnnouncementsController < ApplicationController send_file(@path, :type=>"application/octet-stream", :filename => @escaped_file_name, :x_sendfile=> true) return end - end + # end else render :file => "#{Rails.root}/app/views/errors/403.html", :layout => false, :status => :not_found, :content_type => 'text/html' return