Skip to content

Commit

Permalink
BB-640 Add VersioningEnabled header to Backbeat client
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas2bert committed Dec 13, 2024
1 parent 2b05c9f commit faedd48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/replication/tasks/ReplicateObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
10 changes: 10 additions & 0 deletions lib/clients/backbeat-2017-07-01.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit faedd48

Please sign in to comment.