Restore JPG、PNG、BMP opening function
This commit is contained in:
parent
db0ea6c621
commit
e0402862b0
|
|
@ -654,8 +654,7 @@ class AnnouncementsController < ApplicationController
|
||||||
@path = file.file.path rescue ""
|
@path = file.file.path rescue ""
|
||||||
@filename = @path.split("/").last
|
@filename = @path.split("/").last
|
||||||
@ext = @path.split("/").last.to_s.split(".").last
|
@ext = @path.split("/").last.to_s.split(".").last
|
||||||
# if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf"
|
if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf"
|
||||||
if @ext == "pdf"
|
|
||||||
render "archives/download_file.html",:layout=>false
|
render "archives/download_file.html",:layout=>false
|
||||||
else
|
else
|
||||||
if (current_site.accessibility_mode rescue false)
|
if (current_site.accessibility_mode rescue false)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue