mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 11:12:20 +08:00
fix(file-manager): when the endpoint is an empty string, set it to undefined
This commit is contained in:
parent
e7e7c6dc00
commit
6bf52c2eef
@ -100,7 +100,7 @@ async function multipart(ctx: Context, next: Next) {
|
|||||||
return ctx.throw(400, err);
|
return ctx.throw(400, err);
|
||||||
}
|
}
|
||||||
ctx.logger.error(err);
|
ctx.logger.error(err);
|
||||||
return ctx.throw(500);
|
return ctx.throw(500, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
const values = getFileData(ctx);
|
const values = getFileData(ctx);
|
||||||
|
@ -19,6 +19,8 @@ export default class extends StorageType {
|
|||||||
const { accessKeyId, secretAccessKey, bucket, acl = 'public-read', ...options } = storage.options;
|
const { accessKeyId, secretAccessKey, bucket, acl = 'public-read', ...options } = storage.options;
|
||||||
if (options.endpoint) {
|
if (options.endpoint) {
|
||||||
options.forcePathStyle = true;
|
options.forcePathStyle = true;
|
||||||
|
} else {
|
||||||
|
options.endpoint = undefined;
|
||||||
}
|
}
|
||||||
const s3 = new S3Client({
|
const s3 = new S3Client({
|
||||||
...options,
|
...options,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user