We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 54f6e55 + a41c4db commit 599fd41Copy full SHA for 599fd41
lib/imageRouter/s3.js
@@ -9,7 +9,16 @@ const logger = require('../logger')
9
const { S3Client } = require('@aws-sdk/client-s3-node/S3Client')
10
const { PutObjectCommand } = require('@aws-sdk/client-s3-node/commands/PutObjectCommand')
11
12
-const s3 = new S3Client(config.s3)
+const credentials = {
13
+ accessKeyId: config.s3.accessKeyId,
14
+ secretAccessKey: config.s3.secretAccessKey
15
+}
16
+
17
+const s3 = new S3Client({
18
+ credentials,
19
+ region: config.s3.region,
20
+ endpoint: config.s3.endpoint
21
+})
22
23
exports.uploadImage = function (imagePath, callback) {
24
if (!imagePath || typeof imagePath !== 'string') {
0 commit comments