【发布时间】:2020-06-08 00:52:23
【问题描述】:
我有这个 URL,但访问被拒绝,需要任何权限。
https://storage.googleapis.com/BUCKET/Artboard_4.png
得到这个错误:
匿名调用者没有 storage.objects.get 访问 Google Cloud Storage 对象的权限。
【问题讨论】:
标签: node.js angular google-cloud-platform google-cloud-storage
我有这个 URL,但访问被拒绝,需要任何权限。
https://storage.googleapis.com/BUCKET/Artboard_4.png
得到这个错误:
匿名调用者没有 storage.objects.get 访问 Google Cloud Storage 对象的权限。
【问题讨论】:
标签: node.js angular google-cloud-platform google-cloud-storage
您好像没有将存储桶权限设置为公开?
在控制台中,您可以点击存储桶菜单中的“设置存储桶权限”。在添加成员中输入“allUsers”并分配角色 -> 存储 -> 存储对象查看器。
使用 gsutil,运行 gsutil -m acl set -R -a public-read gs://bucket 应将对该存储桶中所有文件的访问权限设置为公开。要设置存储桶的默认权限,以便在添加文件时默认为公共文件,请使用gsutil defacl set public-read gs://bucket。
【讨论】: