How to setmeta - Set metadata on already uploaded objects,multiple Objects -GCS
PREM KUMAR
Posted on May 14, 2022
The gsutil setmeta command allows you to set or remove the metadata on one or more objects. It takes one or more header arguments followed by one or more URLs, where each header argument is in one of two forms:
gsutil setmeta -h [header:value|header] ... url...
setmeta to a object If you want to set cache-control to "public" then execute in Cloud Shell:
gsutil setmeta -h "Cache-Control:public" gs://<YOUR-BUCKET-NAME>/objectName
setmeta to multiple object If you want to set cache-control to "public" then execute in Cloud Shell:
gsutil setmeta -h "Cache-Control:public" gs://<YOUR-BUCKET-NAME>/*.*
*.*
will add add the files inside the directory
Be a Opensource Contributor
💖 💪 🙅 🚩
PREM KUMAR
Posted on May 14, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
javascript How to setmeta - Set metadata on already uploaded objects,multiple Objects -GCS
May 14, 2022