diff --git a/src/config.ts b/src/config.ts index ac012aca66..fcd0540dd6 100644 --- a/src/config.ts +++ b/src/config.ts @@ -85,5 +85,7 @@ export default { access_key_id: null, secret_key: null, defaultBucketName: null, + endpoint: null, + forcePathStyle: null, }, }; diff --git a/src/util/functions.ts b/src/util/functions.ts index 573b109e6e..626e4da6db 100644 --- a/src/util/functions.ts +++ b/src/util/functions.ts @@ -149,7 +149,11 @@ async function autoDownload(client: any, req: any, message: any) { !config.aws_s3.secret_key ) throw new Error('Please, configure your aws configs'); - const s3Client = new S3Client({ region: config.aws_s3.region }); + const s3Client = new S3Client({ + region: config.aws_s3.region, + endpoint: config.aws_s3.endpoint || undefined, + forcePathStyle: config.aws_s3.forcePathStyle || undefined, + }); let bucketName = config.aws_s3.defaultBucketName ? config.aws_s3.defaultBucketName : client.session;