MCPcopy
hub / github.com/scality/cloudserver / mpuSetup

Function mpuSetup

tests/multipleBackend/multipartUpload.js:273–293  ·  view source on GitHub ↗
(location, key, cb)

Source from the content-addressed store, hash-verified

271}
272
273function mpuSetup(location, key, cb) {
274 const initiateRequest = {
275 bucketName,
276 namespace,
277 objectKey: key,
278 headers: { 'host': `${bucketName}.s3.amazonaws.com`,
279 'x-amz-meta-scal-location-constraint': location },
280 url: `/${key}?uploads`,
281 parsedHost: 'localhost',
282 actionImplicitDenies: false,
283 };
284 initiateMultipartUpload(authInfo, initiateRequest, log,
285 (err, result) => {
286 assert.strictEqual(err, null, 'Error initiating MPU');
287 assertMpuInitResults(result, key, uploadId => {
288 putParts(uploadId, key, () => {
289 cb(uploadId);
290 });
291 });
292 });
293}
294
295function putObject(putBackend, objectKey, cb) {
296 const putParams = Object.assign({

Callers 1

multipartUpload.jsFile · 0.70

Calls 3

assertMpuInitResultsFunction · 0.85
putPartsFunction · 0.85
initiateMultipartUploadFunction · 0.50

Tested by

no test coverage detected