@@ -29,7 +29,7 @@ module.exports = function defineS3Hook(sails) {
|
||||
|
||||
sails.log.info('Initializing custom hook (`s3`)');
|
||||
|
||||
client = new S3Client({
|
||||
const config = {
|
||||
endpoint: sails.config.custom.s3Endpoint,
|
||||
region: sails.config.custom.s3Region || 'eu-central-1',
|
||||
credentials: {
|
||||
@@ -37,7 +37,13 @@ module.exports = function defineS3Hook(sails) {
|
||||
secretAccessKey: sails.config.custom.s3SecretAccessKey,
|
||||
},
|
||||
forcePathStyle: sails.config.custom.s3ForcePathStyle,
|
||||
});
|
||||
};
|
||||
|
||||
if (sails.config.custom.s3RequestChecksumCalculation) {
|
||||
config.requestChecksumCalculation = sails.config.custom.s3RequestChecksumCalculation;
|
||||
}
|
||||
|
||||
client = new S3Client(config);
|
||||
},
|
||||
|
||||
getClient() {
|
||||
|
||||
Reference in New Issue
Block a user