amazon s3 - Change the default content type on multiple files that have been uploaded to a AWS S3 bucket -
using aws-cli uploaded 5gb of files amazon s3 bucket have made static website. of files site references .shtml files, s3 has defaulted metadata content type of binary/octet-stream want files have metadata content-type of text/html. otherwise doesn't work in browser.
is there aws-cli s3api command can use change content type files .shtml extension?
you can set content type on specific file types following.
"aws s3 sync ${base_dir} s3://${bucket_name} --exclude *.shtml" "aws s3 sync ${base_dir} s3://${bucket_name} --exclude '*' --include '*.shtml' --no-guess-mime-type --content-type text/html"
Comments
Post a Comment