diff --git a/extensions/replication/tasks/ReplicateObject.js b/extensions/replication/tasks/ReplicateObject.js index 7ed282b79..c05f6788d 100644 --- a/extensions/replication/tasks/ReplicateObject.js +++ b/extensions/replication/tasks/ReplicateObject.js @@ -466,6 +466,8 @@ class ReplicateObject extends BackbeatTask { ContentLength: partSize, ContentMD5: partObj.getPartETag(), Body: incomingMsg, + // destination bucket has to be versioning enabled. + VersioningRequired: true, }); attachReqUids(destReq, log); const writeStartTime = Date.now(); @@ -537,6 +539,8 @@ class ReplicateObject extends BackbeatTask { ContentLength: Buffer.byteLength(mdBlob), Body: mdBlob, ReplicationContent: replicationContent, + // destination bucket has to be versioning enabled. + VersioningRequired: true, }); attachReqUids(req, log); const writeStartTime = Date.now(); diff --git a/lib/clients/backbeat-2017-07-01.api.json b/lib/clients/backbeat-2017-07-01.api.json index cc5fd2bf9..1bfcb4424 100644 --- a/lib/clients/backbeat-2017-07-01.api.json +++ b/lib/clients/backbeat-2017-07-01.api.json @@ -46,6 +46,11 @@ "location": "header", "locationName": "X-Scal-Canonical-Id" }, + "VersioningRequired": { + "location": "header", + "locationName": "x-scal-versioning-required", + "type": "boolean" + }, "Body": { "streaming": true, "type": "blob" @@ -589,6 +594,11 @@ "location": "header", "locationName": "x-scal-replication-content", "type": "string" + }, + "VersioningRequired": { + "location": "header", + "locationName": "x-scal-versioning-required", + "type": "boolean" } }, "payload": "Body"