diff --git a/src/StorageAmazonS3.ts b/src/StorageAmazonS3.ts index 987e8f0..3df2955 100644 --- a/src/StorageAmazonS3.ts +++ b/src/StorageAmazonS3.ts @@ -19,8 +19,7 @@ export class StorageAmazonS3 extends AbstractStorage implements IStorage { throw new Error('provide both an accessKeyId and a secretAccessKey!'); } this.storage = new S3({ - accessKeyId, - secretAccessKey, + ...config, apiVersion: '2006-03-01', }); // console.log(config, this.bucketName); diff --git a/src/types.ts b/src/types.ts index dc8ea46..7498985 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,5 @@ import { Readable } from 'stream'; +import {bool} from 'aws-sdk/clients/signer'; export interface IStorage { /** @@ -76,6 +77,12 @@ export type ConfigAmazonS3 = { bucketName?: string, accessKeyId: string, secretAccessKey: string, + endpoint?: string, + useDualstack?: boolean, + region?: string, + maxRetries?: number, + maxRedirects?: number, + sslEnabled?: boolean, }; export type ConfigGoogleCloud = {