Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/s3/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export const commonS3Config: Partial<S3ConfigType> = {
? new HttpProxyAgent(process.env.HTTP_PROXY)
: process.env.HTTPS_PROXY
? new HttpsProxyAgent(process.env.HTTPS_PROXY)
: undefined
: undefined,
pathStyle: process.env.S3_PATH_STYLE === 'false' ? false : true
} as const;

export const FileMetadataSchema = z.object({
Expand Down
6 changes: 4 additions & 2 deletions lib/s3/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export class S3Service {
useSSL: this.config.useSSL,
accessKey: this.config.accessKey,
secretKey: this.config.secretKey,
transportAgent: this.config.transportAgent
transportAgent: this.config.transportAgent,
pathStyle: this.config.pathStyle
});

if (this.config.externalBaseURL) {
Expand All @@ -57,7 +58,8 @@ export class S3Service {
port: externalPort,
accessKey: this.config.accessKey,
secretKey: this.config.secretKey,
transportAgent: this.config.transportAgent
transportAgent: this.config.transportAgent,
pathStyle: this.config.pathStyle
});
}
}
Expand Down
1 change: 1 addition & 0 deletions runtime/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ S3_ACCESS_KEY=minioadmin
S3_SECRET_KEY=minioadmin
S3_PUBLIC_BUCKET=fastgpt-public # 公开读私有写桶。用于系统工具,创建的临时文件,存储的桶。
S3_PRIVATE_BUCKET=fastgpt-private # 私有读写桶。用于系统插件热安装文件的桶。
S3_PATH_STYLE=false #pathStyle 模式 默认true

# Signoz
SIGNOZ_BASE_URL=
Expand Down