From e03677b5b1b281b19c9fccb7d9004ad489dbb60c Mon Sep 17 00:00:00 2001 From: Manazd Date: Fri, 14 Jul 2023 13:33:29 +0330 Subject: [PATCH] fix [S3] PutCopy not passing Content-Type --- s3/s3.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/s3/s3.go b/s3/s3.go index e85e5813..14f2615d 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -399,10 +399,11 @@ func (b *Bucket) Put(path string, data []byte, contType string, perm ACL, option } // PutCopy puts a copy of an object given by the key path into bucket b using b.Path as the target key -func (b *Bucket) PutCopy(path string, perm ACL, options CopyOptions, source string) (*CopyObjectResult, error) { +func (b *Bucket) PutCopy(path string, perm ACL, options CopyOptions, source string, contentType string) (*CopyObjectResult, error) { headers := map[string][]string{ "x-amz-acl": {string(perm)}, "x-amz-copy-source": {escapePath(source)}, + "Content-Type": {contentType}, } options.addHeaders(headers) req := &request{