存储桶中图像的两个不同链接?有什么不同?
Two different links to an image in a bucket? What's the difference?
前段时间我上传了一张图片到 Google Cloud Platform 存储桶并使其成为 public。直接 link,从 GCP 看起来像这样:
但是这个 link,当作为头像 URL 放入 Hangouts Chat API 时不起作用(在 Hangouts 聊天中显示默认头像,而不是我的头像)。
我还找到了一种创建 url 的方法,它的:https://storage.googleapis.com/[bucket]/[file] 并且这个正在运行,不知道为什么。
我的问题是,为什么 "official" link 不起作用,而第二个起作用?它们之间有什么区别,storage.cloud.google.com 与 storage.googleapis.com 之间的区别?
这应该可以帮助您更好地理解这两个链接之间的区别。
Access to public objects
All requests to the storage.cloud.google.com URI require authentication. This applies even when allUsers have permission to access an object. If you want users to download anonymously accessible objects without authenticating, use the storage.googleapis.com URI documented in Direct API requests. For details and examples, see Accessing Public Data.
Here 您有关于该主题的更多信息。
希望这对您有所帮助:)
前段时间我上传了一张图片到 Google Cloud Platform 存储桶并使其成为 public。直接 link,从 GCP 看起来像这样:
但是这个 link,当作为头像 URL 放入 Hangouts Chat API 时不起作用(在 Hangouts 聊天中显示默认头像,而不是我的头像)。
我还找到了一种创建 url 的方法,它的:https://storage.googleapis.com/[bucket]/[file] 并且这个正在运行,不知道为什么。
我的问题是,为什么 "official" link 不起作用,而第二个起作用?它们之间有什么区别,storage.cloud.google.com 与 storage.googleapis.com 之间的区别?
这应该可以帮助您更好地理解这两个链接之间的区别。
Access to public objects All requests to the storage.cloud.google.com URI require authentication. This applies even when allUsers have permission to access an object. If you want users to download anonymously accessible objects without authenticating, use the storage.googleapis.com URI documented in Direct API requests. For details and examples, see Accessing Public Data.
Here 您有关于该主题的更多信息。
希望这对您有所帮助:)