(bucketName, cipherBundle, params, log, cb)
| 508 | }, |
| 509 | |
| 510 | metadataStoreMPObject(bucketName, cipherBundle, params, log, cb) { |
| 511 | assert.strictEqual(typeof bucketName, 'string'); |
| 512 | assert.strictEqual(typeof params.splitter, 'string'); |
| 513 | // TODO: Determine splitter that will not appear in |
| 514 | // any of these items. This is GH Issue#218 |
| 515 | // 1) ObjectKey can contain any characters so when initiating |
| 516 | // the MPU, we restricted the ability to create an object containing |
| 517 | // the splitter. |
| 518 | // 2) UploadId's are UUID version 4 |
| 519 | const splitter = params.splitter; |
| 520 | const longMPUIdentifier = |
| 521 | `overview${splitter}${params.objectKey}` + |
| 522 | `${splitter}${params.uploadId}`; |
| 523 | const multipartObjectMD = {}; |
| 524 | multipartObjectMD.id = params.uploadId; |
| 525 | multipartObjectMD.eventualStorageBucket = params.eventualStorageBucket; |
| 526 | multipartObjectMD.initiated = new Date().toJSON(); |
| 527 | // Note: opting to store the initiator and owner |
| 528 | // info here (including display names) |
| 529 | // rather than just saving the canonicalID and |
| 530 | // calling the display name when get a view request. |
| 531 | // Since multi-part upload will likely not be open |
| 532 | // for that long, seems unnecessary |
| 533 | // to be concerned about a change in the display |
| 534 | // name while the multi part upload is open. |
| 535 | multipartObjectMD['owner-display-name'] = params.ownerDisplayName; |
| 536 | multipartObjectMD['owner-id'] = params.ownerID; |
| 537 | multipartObjectMD.initiator = { |
| 538 | DisplayName: params.initiatorDisplayName, |
| 539 | ID: params.initiatorID, |
| 540 | }; |
| 541 | multipartObjectMD.key = params.objectKey; |
| 542 | multipartObjectMD.uploadId = params.uploadId; |
| 543 | multipartObjectMD['cache-control'] = params.headers['cache-control']; |
| 544 | multipartObjectMD['content-disposition'] = |
| 545 | params.headers['content-disposition']; |
| 546 | multipartObjectMD['content-encoding'] = |
| 547 | removeAWSChunked(params.headers['content-encoding']); |
| 548 | multipartObjectMD['content-type'] = |
| 549 | params.headers['content-type']; |
| 550 | multipartObjectMD.expires = |
| 551 | params.headers.expires; |
| 552 | multipartObjectMD['x-amz-storage-class'] = params.storageClass; // TODO: removed CLDSRV-639 |
| 553 | multipartObjectMD['x-amz-website-redirect-location'] = |
| 554 | params.headers['x-amz-website-redirect-location']; |
| 555 | if (cipherBundle) { |
| 556 | multipartObjectMD['x-amz-server-side-encryption'] = |
| 557 | cipherBundle.algorithm; |
| 558 | if (cipherBundle.masterKeyId) { |
| 559 | multipartObjectMD[ |
| 560 | 'x-amz-server-side-encryption-aws-kms-key-id'] = |
| 561 | cipherBundle.masterKeyId; |
| 562 | } |
| 563 | } |
| 564 | multipartObjectMD.controllingLocationConstraint = |
| 565 | params.controllingLocationConstraint; |
| 566 | multipartObjectMD.dataStoreName = params.dataStoreName; |
| 567 | if (params.tagging) { |
nothing calls this directly
no test coverage detected