Added support of path-style S3 endpoints

This can be very useful when using S3-compatible object storages like MinIO
This commit is contained in:
Denis
2024-07-29 23:48:29 +03:00
parent e11f1a95f6
commit c09384e49b
2 changed files with 5 additions and 0 deletions

View File

@@ -236,6 +236,10 @@ module.exports = {
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
endpoint: process.env.S3_ENDPOINT,
bucket: process.env.S3_BUCKET || 'bigcapital-documents',
forcePathStyle: parseBoolean(
defaultTo(process.env.S3_FORCE_PATH_STYLE, false),
false
),
},
loops: {

View File

@@ -8,4 +8,5 @@ export const s3 = new S3Client({
secretAccessKey: config.s3.secretAccessKey,
},
endpoint: config.s3.endpoint,
forcePathStyle: config.s3.forcePathStyle,
});