Skip to content

Commit

Permalink
improvement: S3C-3727 update deprecated Buffer usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulreddy committed Dec 17, 2020
1 parent 10627f5 commit 269e005
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/storage/data/external/PfsClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PfsClient {
const b64 = keyContext.metaHeaders['x-amz-meta-md5chksum'];
let md5 = null;
if (b64) {
md5 = new Buffer(b64, 'base64').toString('hex');
md5 = Buffer.from(b64, 'base64').toString('hex');
}
return callback(null, keyContext.objectKey, '',
keyContext.metaHeaders['x-amz-meta-size'],
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/mdProxyUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class DummyProxyRequest {
this.method = params.method;
this.url = params.url;
this.json = params.json;
this.body = new Buffer(
this.body = Buffer.from(
this.json ? JSON.stringify(params.body) : (params.body || ''));
this.headers = params.headers;
this.socket = {
Expand Down

0 comments on commit 269e005

Please sign in to comment.