Set metadata for all objects in a Google Storage bucket
问题 I want to set Content-Type metadata to image/jpeg for all objects of a Google Storage bucket. How to do this? 回答1: 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. 来源: https://stackoverflow.com/questions/52691451/set-metadata-for-all-objects-in-a-google