google cloud storage - How can I use gsutil to only make my *.jpg and *.png images public? -
i have bucket many subdirectories containing variety of different files. how can make images accessible publicly? following great making public don't seem able filter on extension.
$ gsutil -m acl set -r -a public-read gs://mybucket
i'd recommend using gsutil acl ch
, preserve existing acls on objects , make them publicly readable. command should trick:
gsutil -m acl ch -u allusers:r gs://mybucket/**/*.png gs://mybucket/**/*.jpg
using canned acl (i.e., acl set -a public-read
) can remove other acl changes you've made.
Comments
Post a Comment