Restore JPG、PNG、BMP opening function

This commit is contained in:
chiu 2026-06-05 03:35:02 +00:00
parent db0ea6c621
commit e0402862b0
1 changed files with 1 additions and 2 deletions

View File

@ -654,8 +654,7 @@ 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"
if @ext == "pdf"
if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf"
render "archives/download_file.html",:layout=>false
else
if (current_site.accessibility_mode rescue false)