def upload_blob_from_memory()

in core/views.py [0:0]


def upload_blob_from_memory(bucket_name, contents, destination_blob_name_image):
    """Uploads a file to the bucket."""
    storage_client = storage.Client()
    blob = bucket.blob(destination_blob_name_image)
    blob.upload_from_filename(contents)

    print(
        f"{destination_blob_name_image} with contents {contents} uploaded to {bucket_name}."
    )