s4cmd icon indicating copy to clipboard operation
s4cmd copied to clipboard

Guessing of ContentType

Open markunsworth opened this issue 8 years ago • 0 comments

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

markunsworth avatar Jun 03 '16 11:06 markunsworth