【发布时间】:2016-06-10 04:17:09
【问题描述】:
从 Node 开始,我正在尝试使用 Google Cloud Vision API 来分析存储在 Google Storage 中的图像。我已经成功地对图像进行了 base64 编码并上传了它,但我想通过执行我在 Google 存储中的文件来加快这个过程。我的要求就是这样,
{ "requests":[ { "image":{ "source": { "gcsImageUri" : "gs://mybucket/10001.jpg" } }, "features":[ { "type":"LABEL_DETECTION ", "maxResults":10 } ] } ] }
但我在通话中收到此错误,
{ "responses": [ { "error": { "code": 7, "message": "image-annotator::User 没有权限。: ACCESS_DENIED: 匿名调用者没有 storage.objects.get 访问权限对象 mybucket/10001.jpg。” } } ] }
我没有为这个请求使用任何谷歌 SDK 或 node_modules,只是一个浏览器 API 密钥和 http 模块。我必须在 Cloud Storage 中设置一些权限以允许 Vision API 访问存储桶中的对象吗?如果是这样,那会是什么,我是 Google Cloud Platform 的新手,但在 AWS IAM 角色方面拥有丰富的经验。
谢谢, 蝰蛇
【问题讨论】:
标签: google-cloud-storage google-cloud-platform google-vision