fix(s3): incorrectly added slash before the Bucket name (#8083 close #8001)

This commit is contained in:
折纸飞机 2025-03-14 17:21:24 +01:00 committed by GitHub
parent 28b61a93fd
commit 04f5525f20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -199,7 +199,7 @@ func (d *S3) copyFile(ctx context.Context, src string, dst string) error {
dstKey := getKey(dst, false)
input := &s3.CopyObjectInput{
Bucket: &d.Bucket,
CopySource: aws.String(url.PathEscape("/" + d.Bucket + "/" + srcKey)),
CopySource: aws.String(url.PathEscape(d.Bucket + "/" + srcKey)),
Key: &dstKey,
}
_, err := d.client.CopyObject(input)