diff --git a/lib/interfaces/multer-extended-s3-options.interface.ts b/lib/interfaces/multer-extended-s3-options.interface.ts index 82cdab6d..25eecac9 100644 --- a/lib/interfaces/multer-extended-s3-options.interface.ts +++ b/lib/interfaces/multer-extended-s3-options.interface.ts @@ -1,6 +1,10 @@ import { LoggerService } from '@nestjs/common'; export interface MulterExtendedS3Options { + /* + * AWS Endpoint + */ + readonly endpoint?: string; /** * AWS Access Key ID */ diff --git a/lib/multer-config.loader.ts b/lib/multer-config.loader.ts index c5e13934..6c9f9e8c 100644 --- a/lib/multer-config.loader.ts +++ b/lib/multer-config.loader.ts @@ -24,7 +24,9 @@ export class MulterConfigLoader implements MulterS3ConfigService { region: s3Options.region || MulterConfigLoader.DEFAULT_REGION, }); - this.S3 = new AWS.S3(); + this.S3 = new AWS.S3({ + endpoint: s3Options.endpoint, + }); this.logger = s3Options.logger || new Logger(MulterConfigLoader.name); this.logger.log(JSON.stringify(s3Options)); }