def allowed_file(filename):
    """
    Check an uploaded filename is of an allowed type.
    """
    allowed_extensions = {'.json', '.zip', '.png'}
    for ext in allowed_extensions:
        if filename.endswith(ext):
            return True
    return False