def _get_image_url(self, image_gcs_filename):
"""
Takes the filename of an image stored in Cloud Storage
and calls the images API to serve it from there.
Returns the images API serving URL
No longer used.
"""
if settings.TESTING or not settings.DEBUG:
if image_gcs_filename:
return get_gcs_image_serving_url(
image_gcs_filename)
else:
# Little local dev hack. We're using the Images API with GCS.
# This doesn't work locally so instead we pass the image dataUri
# and use it directly
return image_gcs_filename
评论列表
文章目录