mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2026-03-11 18:35:59 +00:00
minio 使用域名时,forcePathStyle为true时,不增加二级域名,而是 xx.com/bucket的形式
This commit is contained in:
parent
619d7ca0af
commit
422760040c
@ -220,6 +220,8 @@ export interface AWSConfig {
|
||||
expires?: number
|
||||
/** publicDomain */
|
||||
publicDomain?: string;
|
||||
/** forcePathStyle */
|
||||
forcePathStyle?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -78,7 +78,7 @@ export class CoolFile {
|
||||
this.client = new QINIU.auth.digest.Mac(accessKeyId, accessKeySecret);
|
||||
}
|
||||
if (aws) {
|
||||
const { accessKeyId, secretAccessKey, region, publicDomain } = aws;
|
||||
const { accessKeyId, secretAccessKey, region, publicDomain, forcePathStyle } = aws;
|
||||
this.client = new S3Client({
|
||||
region,
|
||||
credentials: { accessKeyId, secretAccessKey },
|
||||
@ -86,6 +86,8 @@ export class CoolFile {
|
||||
endpoint: publicDomain
|
||||
? publicDomain
|
||||
: `https://s3.${region}.amazonaws.com`,
|
||||
// minio 使用域名时,forcePathStyle为true时,不增加二级域名,而是 xx.com/bucket的形式
|
||||
forcePathStyle: forcePathStyle ? forcePathStyle : false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,6 +108,8 @@ export interface AWSConfig {
|
||||
expires?: number;
|
||||
/** publicDomain */
|
||||
publicDomain?: string;
|
||||
/** forcePathStyle */
|
||||
forcePathStyle?: boolean;
|
||||
}
|
||||
|
||||
export interface QINIUConfig {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user