mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2026-03-17 19:23:30 +00:00
Merge pull request #5 from jackieZhouQQ/patch-1
minio 使用域名时,forcePathStyle为true时,不增加二级域名,而是 xx.com/bucket的形式
This commit is contained in:
commit
b96ff14476
@ -220,6 +220,8 @@ export interface AWSConfig {
|
|||||||
expires?: number
|
expires?: number
|
||||||
/** publicDomain */
|
/** publicDomain */
|
||||||
publicDomain?: string;
|
publicDomain?: string;
|
||||||
|
/** forcePathStyle */
|
||||||
|
forcePathStyle?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -78,7 +78,7 @@ 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, publicDomain } = aws;
|
const { accessKeyId, secretAccessKey, region, publicDomain, forcePathStyle } = aws;
|
||||||
this.client = new S3Client({
|
this.client = new S3Client({
|
||||||
region,
|
region,
|
||||||
credentials: { accessKeyId, secretAccessKey },
|
credentials: { accessKeyId, secretAccessKey },
|
||||||
@ -86,6 +86,8 @@ export class CoolFile {
|
|||||||
endpoint: publicDomain
|
endpoint: publicDomain
|
||||||
? publicDomain
|
? publicDomain
|
||||||
: `https://s3.${region}.amazonaws.com`,
|
: `https://s3.${region}.amazonaws.com`,
|
||||||
|
// minio 使用域名时,forcePathStyle为true时,不增加二级域名,而是 xx.com/bucket的形式
|
||||||
|
forcePathStyle: forcePathStyle ? forcePathStyle : false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,6 +108,8 @@ export interface AWSConfig {
|
|||||||
expires?: number;
|
expires?: number;
|
||||||
/** publicDomain */
|
/** publicDomain */
|
||||||
publicDomain?: string;
|
publicDomain?: string;
|
||||||
|
/** forcePathStyle */
|
||||||
|
forcePathStyle?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface QINIUConfig {
|
export interface QINIUConfig {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user