Ensure all S3 CopySource properties are URI encoded

This commit is contained in:
Johannes Zellner
2017-10-04 19:07:08 +02:00
parent 322a9a18d7
commit 38331e71e2

View File

@@ -277,7 +277,7 @@ function copy(apiConfig, oldFilePath, newFilePath, callback) {
var params = {
Bucket: apiConfig.bucket,
Key: path.join(newFilePath, relativePath),
CopySource: path.join(apiConfig.bucket, content.Key),
CopySource: encodeURIComponent(path.join(apiConfig.bucket, content.Key)),
CopySourceRange: 'bytes=' + startBytes + '-' + endBytes,
PartNumber: partNumber,
UploadId: uploadId