generalization file type
This commit is contained in:
parent
f4692182c0
commit
5f7453c3fb
|
@ -38,8 +38,8 @@ module Panel::Announcement::BackEnd::BulletinsHelper
|
||||||
|
|
||||||
def file_picture_preview_setting(file_path)
|
def file_picture_preview_setting(file_path)
|
||||||
res= ""
|
res= ""
|
||||||
ext = File.extname(file_path)[1..-1]
|
#ext = File.extname(file_path)
|
||||||
puts ext
|
ext = MIME::Types.type_for(file_path).first.to_s.split("/")[1]
|
||||||
unless file_path.nil?
|
unless file_path.nil?
|
||||||
case ext
|
case ext
|
||||||
when "jpg","jpeg","png","gif"
|
when "jpg","jpeg","png","gif"
|
||||||
|
|
Loading…
Reference in New Issue