Ben Shoval
Ben Shoval

Reputation: 1750

Set all files in Google Cloud Storage bucket to gzip by default

I am trying to set a Google Cloud Storage bucket so that any files I upload are automatically gzip'd and "Content-Encoding: gzip" is set.

I tried "gsutil defacl set public-read gs://bucket" based upon Set all files in Google Cloud Storage Bucket to public by default but was unsuccessful.

Any ideas?

Upvotes: 2

Views: 670

Answers (1)

Mike Schwartz
Mike Schwartz

Reputation: 12145

There's no way to configure a bucket to automatically gzip files being uploaded there by default. One possibility would be to configure object change notifications on the bucket and implement code that responds to the notifications by reading the new input object and writing a compressed equivalent and then deleting the original.

Upvotes: 0

Related Questions