Reputation: 371
While transferring my files using "aws s3 sync", transferred files does not have right Content-type and Content-encoding. I am able to solve the types by tweaking /etc/mime.types
however no idea how to set right encoding for ".gz" extension so zipped files are served as text apart from:
Any idea how to solve this? Thanks...
Upvotes: 0
Views: 2668
Reputation: 13025
Here is how I solved it,
aws s3 sync /tmp/foo/ s3://bucket/ --recursive --exclude "*" --include "*.gz" --content-type "text/plain; charset=UTF-8"
By default aws s3 sync command assumes the best matching content types. If you want to change the default behavior you need to handle them separately.
Reference:
https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html
Hope it helps.
Upvotes: 3