def custom_path_handler(instance, filename: str) -> str:
    """
    Handle path and name to save file in storage
    """
    dir_ = instance.hash[:2]
    name = instance.hash
    if '.' in filename:
        file_extension = f'.{filename.split(".")[-1]}'
        return f'{dir_}/{name}{file_extension}'
    else:
        return f'{dir_}/{name}'