cartodb-4.42/app/controllers/helpers/avatar_helper.rb

8 lines
190 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
module AvatarHelper
AVATAR_VALID_EXTENSIONS = %w{ jpeg jpg gif png }
def valid_avatar_file?(file_src)
AVATAR_VALID_EXTENSIONS.include?(File.extname(file_src).tr('.', ''))
end
end