<filename>app_folder/tools/image_upload.py<gh_stars>0
from cloudinary import uploader


def image_upload(image_str) -> str:
    try:
        result = uploader.upload(image_str)
    except FileNotFoundError as e:
        raise ValueError(e)
    return result['url']
<filename>app_folder/tools/image_upload.py<gh_stars>0
from cloudinary import uploader


def image_upload(image_str) -> str:
    try:
        result = uploader.upload(image_str)
    except FileNotFoundError as e:
        raise ValueError(e)
    return result['url']