s4cmd
s4cmd copied to clipboard
Guessing of ContentType
When syncing a directory tree to S3 (using sync/dsync) the ContentType is being set as binary/octet-stream
on all files.
s4cmd --num-threads=100 --recursive dsync local_app_folder/static/dist/ s3:/my_s3_bucket/app/static/ --API-ACL="public-read" --API-CacheControl="max-age=31536000, public"
As the directory structure contains varying filetypes its not possible to set using the --API-ContentType
parameter. I can set the --API-ContentType
to a blank string but that actually sets the contentType as blank on S3 which has unexpected behaviour when trying to load some file formats.
s4cmd --num-threads=100 --recursive dsync local_app_folder/static/dist/ s3:/my_s3_bucket/app/static/ --API-ACL="public-read" --API-CacheControl="max-age=31536000, public" --API-ContentType=""
It would be good to support the mimetype guessing like S3cmd