Skip to content

Commit d1de8c4

Browse files
committed
getbucket and putObjectCopy reimplem
1 parent 72e146e commit d1de8c4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/storage/data/DataWrapper.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,7 @@ class DataWrapper {
498498
new RelayMD5Sum(totalHash, updatedHash => {
499499
totalHash = updatedHash;
500500
});
501-
const actualStream = stream.createReadStream();
502-
actualStream.pipe(hashedStream);
501+
stream.pipe(hashedStream);
503502

504503
// destLocationConstraintName is location of the
505504
// destination MPU object

lib/storage/data/external/GCP/GcpService.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ class GcpClient extends S3Client {
239239
.customizeDescription('GCP: getObjectAcl not implemented'));
240240
}
241241

242+
getBucket(params, callback) {
243+
return this.listObjects(params, callback);
244+
}
245+
242246
/**
243247
* Multipart upload (managed upload, single or multi-part).
244248
* @param {object} params - S3 upload params
@@ -254,6 +258,10 @@ class GcpClient extends S3Client {
254258
}
255259
}
256260

261+
putObjectCopy(params, callback) {
262+
return this.copyObject(params, callback);
263+
}
264+
257265
/**
258266
* List objects in a bucket.
259267
* @param {object} params - S3 listObjects params

0 commit comments

Comments
 (0)