generalization file type

This commit is contained in:
Rueshyna 2013-01-02 16:58:48 +08:00
parent f4692182c0
commit 5f7453c3fb
1 changed files with 2 additions and 2 deletions

View File

@ -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"