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

Function putObject

tests/utapi/awsNodeSdk.js:40–50  ·  view source on GitHub ↗
(bucket, key, size, cb)

Source from the content-addressed store, hash-verified

38}
39
40function putObject(bucket, key, size, cb) {
41 const body = Buffer.alloc(size);
42 const params = {
43 Bucket: bucket,
44 Key: key,
45 Body: body,
46 };
47 s3Client.send(new PutObjectCommand(params))
48 .then(data => cb(null, data))
49 .catch(cb);
50}
51
52function deleteObject(bucket, key, cb) {
53 s3Client.send(new DeleteObjectCommand({ Bucket: bucket, Key: key }))

Callers 1

awsNodeSdk.jsFile · 0.70

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected