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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -