src/api/models.py
def book_image_file_path(instance, filename):
    """
    Generate a file path and unique name for new book image
    """
    ext = filename.split(".")[-1]
    filename = f"{uuid.uuid4()}.{ext}"

    return os.path.join("uploads/book/", filename)

    Generate a file path and unique name for new book image
    
Generate a file path and unique name for new book image
Generate a file path and unique name for new book image
def book_image_file_path(instance, filename):
    ext = filename.split(".")[-1]
    filename = f"{uuid.uuid4()}.{ext}"
    return os.path.join("uploads/book/", filename)
def book_image_file_path ( instance , filename ) : ext = filename . split ( "." ) [ - 1 ] filename = f"{uuid.uuid4()}.{ext}" return os . path . join ( "uploads/book/" , filename )
Generate a file path and unique name for new book image
Generate a file path and unique name for new book image
"""
    Generate a file path and unique name for new book image
    """
instance
filename