mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2025-12-15 08:22:49 +00:00
添加aws客户端对minio的支持
This commit is contained in:
parent
314dc6bbf9
commit
a5a3dc1665
@ -78,10 +78,12 @@ export class CoolFile {
|
|||||||
this.client = new QINIU.auth.digest.Mac(accessKeyId, accessKeySecret);
|
this.client = new QINIU.auth.digest.Mac(accessKeyId, accessKeySecret);
|
||||||
}
|
}
|
||||||
if (aws) {
|
if (aws) {
|
||||||
const { accessKeyId, secretAccessKey, region } = aws;
|
const { accessKeyId, secretAccessKey, region, publicDomain } = aws;
|
||||||
this.client = new S3Client({
|
this.client = new S3Client({
|
||||||
region,
|
region,
|
||||||
credentials: { accessKeyId, secretAccessKey },
|
credentials: { accessKeyId, secretAccessKey },
|
||||||
|
// 支持自定义s3服务,如minio等
|
||||||
|
endpoint: publicDomain ? publicDomain : `https://s3.${region}.amazonaws.com`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user