From a5a3dc1665130de0209a5e62f86225a2fc77f73b Mon Sep 17 00:00:00 2001 From: jackieZhouQQ <108133430+jackieZhouQQ@users.noreply.github.com> Date: Tue, 3 Oct 2023 15:11:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0aws=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E5=AF=B9minio=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- file/src/file.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/file/src/file.ts b/file/src/file.ts index 10efa59..c8b401e 100644 --- a/file/src/file.ts +++ b/file/src/file.ts @@ -78,10 +78,12 @@ export class CoolFile { this.client = new QINIU.auth.digest.Mac(accessKeyId, accessKeySecret); } if (aws) { - const { accessKeyId, secretAccessKey, region } = aws; + const { accessKeyId, secretAccessKey, region, publicDomain } = aws; this.client = new S3Client({ region, credentials: { accessKeyId, secretAccessKey }, + // 支持自定义s3服务,如minio等 + endpoint: publicDomain ? publicDomain : `https://s3.${region}.amazonaws.com`, }); } }