From 2769a96f132b66a9ed9b7f71ce5f4ee35953c1eb Mon Sep 17 00:00:00 2001 From: "changlin.shi" Date: Fri, 2 Dec 2022 11:05:26 +0800 Subject: [PATCH] dont't set destination when copy object Signed-off-by: changlin.shi --- weed/s3api/s3api_object_copy_handlers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/weed/s3api/s3api_object_copy_handlers.go b/weed/s3api/s3api_object_copy_handlers.go index 83120ef07..5e97f5230 100644 --- a/weed/s3api/s3api_object_copy_handlers.go +++ b/weed/s3api/s3api_object_copy_handlers.go @@ -98,8 +98,7 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request return } glog.V(2).Infof("copy from %s to %s", srcUrl, dstUrl) - destination := fmt.Sprintf("%s/%s%s", s3a.option.BucketsPath, dstBucket, dstObject) - etag, errCode := s3a.putToFiler(r, dstUrl, resp.Body, destination) + etag, errCode := s3a.putToFiler(r, dstUrl, resp.Body, "") if errCode != s3err.ErrNone { s3err.WriteErrorResponse(w, r, errCode)