Currently I use three steps to gzip some static assets and then use s3cmd to an S3 bucket (technically it's a Digital Ocean Spaces bucket). Here's what I do:
$ find . -type f -name '*.css' | xargs -I{} gzip -k -9 {}$ find . -type f -name '*.css.gz' | xargs -I{} s3cmd put --acl-public --add-header='Content-Encoding: gzip' {} s3://mybucket/assets/{}- But then I have to manually change all of the extensions in my bucket to remove the
.gzextension.
Is there a way that I won't have to manually do step 3? I'd love to know if it's possible in step 2 to remove the .gz extension in the destination. I do want to keep the original files on my server though, so that's a deal breaker.