Closed 4o4x closed 3 months ago
In s5cmd, the --content-type flag does not work when performing an S3 to S3 copy operation with the cp command.
> aws --endpoint-url=http://localhost:4566 s3api head-object --bucket copy-test --key src/test.txt
{ "AcceptRanges": "bytes", "LastModified": "2024-07-10T08:06:17+00:00", "ContentLength": 12, "ETag": "\"90a6f0c908b76d95b8d9c0e6405b2fd5\"", "ContentType": "text/plain", "ServerSideEncryption": "AES256", "Metadata": {} }
> aws --endpoint-url=http://localhost:4566 s3 cp s3://copy-test/src/test.txt s3://copy-test/dest/test.txt --content-type video/mp4
copy: s3://copy-test/src/test.txt to s3://copy-test/dest/test.txt
> aws --endpoint-url=http://localhost:4566 s3api head-object --bucket copy-test --key dest/test.txt
{ "AcceptRanges": "bytes", "LastModified": "2024-07-10T08:09:34+00:00", "ContentLength": 12, "ETag": "\"90a6f0c908b76d95b8d9c0e6405b2fd5\"", "ContentType": "video/mp4", "ServerSideEncryption": "AES256", "Metadata": {} }
> s5cmd --endpoint-url=http://localhost:4566 cp --content-type video/mp4 s3://copy-test/src/test.txt s3://copy-test/dest/test2.txt
cp s3://copy-test/src/test.txt s3://copy-test/dest/test2.txt
> aws --endpoint-url=http://localhost:4566 s3api head-object --bucket copy-test --key dest/test2.txt
{ "AcceptRanges": "bytes", "LastModified": "2024-07-10T08:17:09+00:00", "ContentLength": 12, "ETag": "\"90a6f0c908b76d95b8d9c0e6405b2fd5\"", "ContentType": "text/plain", "ServerSideEncryption": "AES256", "Metadata": {} }
In s5cmd, the --content-type flag does not work when performing an S3 to S3 copy operation with the cp command.
Tests
Object Info
AWS CLI Test
s5cmd test