在 Google Cloud Storage 中,是否可以将存储桶引用从 gs:// 开头更改为 data://、http:// 或 https://?

问题描述 投票:0回答:1

我正在尝试在外部 API 中使用指向 Google Cloud Storage 中我的文件的链接。但是,Google Cloud Storage 中的所有文件链接均以 gs:// 开头,而不是 https://,并且 API 无法访问我的 Google Cloud Storage 中的 zip 文件。如何将存储 zip 文件的存储桶的存储桶引用更改为以 data://、http:// 或 https:// 开头,以便 API 可以通过链接访问 zip 文件?如果您无法更改存储桶参考,如何通过互联网访问存储在 Google Cloud Storage 中的 zip 文件的链接?

firebase google-cloud-storage
1个回答
0
投票

方案

gs://
是Google Cloud工具和SDK约定。

Google Cloud Storage 还提供标准 HTTP 端点。

公共对象使用以下格式:

https://BUCKET_NAME.storage.googleapis.com/OBJECT_NAME

欲了解更多信息:

Google Cloud Storage 请求端点

© www.soinside.com 2019 - 2024. All rights reserved.