def upload_image_file(file):
    if not file:
        return None

    public_url = storage.upload_file(
        file.read(),
        file.filename,
        file.content_type
    )

    current_app.logger.info(
        "Uploaded file %s as %s.", file.filename, public_url)

    return public_url
Issue a warning, or maybe ignore it or raise an exception.
dataset/ETHPy150Open GoogleCloudPlatform/getting-started-python/6-pubsub/bookshelf/crud.py/upload_image_file--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/warnings.py/warn