如何在Google云端储存中公开许多档案? [英] How do you make many files public in Google Cloud Storage?
本文介绍了如何在Google云端储存中公开许多档案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Google云端存储中有1000个文件公开,或者一般是目录层次结构。
I have 1000 files in Google Cloud Storage to make public, or in general a directory hierarchy.
在Web UI中,我只能看到一个一个时间公开。
In the Web UI, I can only seem to make one at a time public.
有一些方法可以做到这一点。
Is there some way to do this.
推荐答案
p>运行 gsutil -m acl set -R -a public-read gs:// bucket
-
-m
同时发出多个请求。 -
-R
为您存储桶中每个对象发出请求。 -
-a
。
- The
-m
issues multiple requests at the same time. - The
-R
issues requests for every object in your bucket. - The
-a
issues requests for every version of every object.
See gsutil help acl
for more info.
在API图层 gsutil help acl
://developers.google.com/storage/docs/gsutil> gsutil 发出以下HTTP请求:
At the API layer gsutil issues the following HTTP request:
PUT /bucket/obj?acl HTTP/1.1
Host: storage.googleapis.com
x-goog-acl: public-read
您可以使用 -D
标志与 gsutil
:
gsutil -D setacl public-read gs://bucket/obj
这篇关于如何在Google云端储存中公开许多档案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文