Skip to content

Commit

Permalink
refactor: Update s3Kit constructor to conditionally update S3 configu…
Browse files Browse the repository at this point in the history
…ration
  • Loading branch information
endomorphosis committed Aug 21, 2024
1 parent 765e733 commit ab93293
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ipfs_model_manager_js/s3_kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ export class s3Kit {
}
}
this.s3 = new AWS.S3(this.s3cfg);
this.s3.config.update({
accessKeyId: this.s3cfg.accessKey,
secretAccessKey: this.s3cfg.secretKey,
endpoint: this.s3cfg.endpoint,
s3ForcePathStyle: true
});
if (this.s3cfg) {
this.s3.config.update({
accessKeyId: this.s3cfg.accessKey,
secretAccessKey: this.s3cfg.secretKey,
endpoint: this.s3cfg.endpoint,
s3ForcePathStyle: true
});
}
}

call(method, kwargs) {
Expand Down

0 comments on commit ab93293

Please sign in to comment.