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

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -