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

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -