def get_file_ext(filetype):
    """
    get extname according filetype
    :param filetype: filetype (in config.get_key('valid_filetype'))
    :return: file's extend name
    """
    return {'image/jpeg': 'jpg', 'image/png': 'png', 'image/webp': 'webp',
        'image/gif': 'gif'}[filetype]
