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)
|
||||
res= ""
|
||||
ext = File.extname(file_path)[1..-1]
|
||||
puts ext
|
||||
#ext = File.extname(file_path)
|
||||
ext = MIME::Types.type_for(file_path).first.to_s.split("/")[1]
|
||||
unless file_path.nil?
|
||||
case ext
|
||||
when "jpg","jpeg","png","gif"
|
||||
|
|
Reference in New Issue