Get Public URL for File - Google Cloud Storage - App Engine (Python)

前端 未结 4 1618
慢半拍i
慢半拍i 2020-12-24 15:28

Is there a python equivalent to the getPublicUrl PHP method?

$public_url = CloudStorageTools::getPublicUrl(\"gs://my_bucket/some_file.txt\", true);
         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 16:01

    You need to use get_serving_url from the Images API. As that page explains, you need to call create_gs_key() first to get the key to pass to the Images API.

提交回复
热议问题