google-cloud-platform - 什么是 Google Cloud Storage 公共读取 uri?
问题描述
我创建了一个谷歌云存储桶并将其 ACL 设置为公开读取。
我的新存储桶中对象的未经身份验证的 URI 是什么?
我试过这个:
https://www.googleapis.com/storage/v1/my-new-bucket/my-object
如此处所述,但它返回“未找到”
解决方案
这是一个示例公共对象 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
推荐阅读
- c++ - 程序可以编译,但分解成函数时实际上并不移动电机
- javascript - 如何使用 VueX 存储字段的值初始化组件?
- html - 如何在悬停的文本中向下滑动图像
- python - 链接 /usr/local/mysql/lib/libmysqlclient.21.dylib 时遇到问题
- javascript - 从外部调用 React setState hook (DOM/Google Maps)
- excel - 将具有两个工作表的 excel 文件拆分为具有相同工作表的多个文件(一个已过滤)
- laravel - Laravel Multihauth:存在还是不存在?
- spring - 如何将导致 DestinationResolutionException 的消息路由到 spring 集成中的自定义错误通道
- git - 以故障安全的方式检查远程分支,丢弃本地更改?
- android - 如何使用 Retrofit 2 从 Dropbox 下载文件