I want to set Content-Type
metadata to image/jpeg
for all objects of a Google Storage bucket.
How to do this?
Using gsutil
and its setmeta
command:
gsutil -m setmeta -h "Content-Type:image/jpeg" gs://YOUR_BUCKET/**/*.jpg
Use the -m
to activate a parallel update, in case you have a lot of objects.
The /**/*
pattern will perform a recursive search on any folders that you may have on your bucket.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With