Skip to content

Commit df7b305

Browse files
committed
feat(exports): allow alternate AWS endpoint
1 parent 3873a05 commit df7b305

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/workers/jobs.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1278,9 +1278,14 @@ const processMessagesChunk = async (campaignId, lastContactId = 0) => {
12781278
};
12791279

12801280
const uploadToS3 = async (key, payload) => {
1281+
let endpoint = undefined;
1282+
if (process.env.AWS_ENDPOINT) {
1283+
endpoint = new AWS.Endpoint(process.env.AWS_ENDPOINT);
1284+
}
12811285
const s3bucket = new AWS.S3({
12821286
signatureVersion: "v4",
1283-
params: { Bucket: process.env.AWS_S3_BUCKET_NAME }
1287+
params: { Bucket: process.env.AWS_S3_BUCKET_NAME },
1288+
endpoint
12841289
});
12851290

12861291
const uploadPparams = { Key: key, Body: payload };

0 commit comments

Comments
 (0)