首页 > 解决方案 > 什么是 Google Cloud Storage 公共读取 uri?

问题描述

我创建了一个谷歌云存储桶并将其 ACL 设置为公开读取。

我的新存储桶中对象的未经身份验证的 URI 是什么?

我试过这个:

https://www.googleapis.com/storage/v1/my-new-bucket/my-object

如此处所述但它返回“未找到”

标签: google-cloud-platformgoogle-cloud-storage

解决方案


这是一个示例公共对象 URL: http: //pub.storage.googleapis.com/shakespeare/rose.txt

相同资源的其他示例:

https://storage.googleapis.com/pub/shakespeare/rose.txt https://pub.storage.googleapis.com/shakespeare/rose.txt

我们的 JSON API 也允许对象下载,但它不是为服务 Web 请求而设计的。这些 URL 通常会涉及一些重定向和/或服务器指示浏览器将对象视为附件:

https://www.googleapis.com/storage/v1/b/pub/o/shakespeare%2Frose.txt?alt=media


推荐阅读