From 56c87f807efce16a9f9ad5e14fcbbeffbaeb3501 Mon Sep 17 00:00:00 2001 From: VirtualHotBar Date: Tue, 2 Jun 2026 02:24:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20#50=20MinIO=E6=B7=BB=E5=8A=A0=E6=97=B6fo?= =?UTF-8?q?rce=5Fpath=5Fstyle=E9=80=89=E9=A1=B9=E4=B8=8D=E5=8F=AF=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将S3存储的force_path_style选项从高级选项提升为基础选项,解决MinIO等自建S3服务用户无法找到此设置的问题。 同时将compress存储的remote、compression_mode、compression_level选项提升为基础选项,解决#42压缩存储配置问题。 --- .../storage/framework/rclone/providers.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/controller/storage/framework/rclone/providers.ts b/src/controller/storage/framework/rclone/providers.ts index 738b5d9..f2f031c 100644 --- a/src/controller/storage/framework/rclone/providers.ts +++ b/src/controller/storage/framework/rclone/providers.ts @@ -119,6 +119,27 @@ async function updateRcloneStorageInfoList() { storageParams.push(storageParam) } + // S3 存储特殊处理:将 force_path_style 从高级选项提升为基础选项 + // MinIO 等自建 S3 服务需要此选项,用户反馈无法找到此设置 + if (provider.Prefix === 's3') { + for (const param of storageParams) { + if (param.name === 'force_path_style') { + param.advanced = false + break + } + } + } + + // 压缩存储特殊处理:将 remote 和压缩选项从高级选项提升为基础选项 + // 用户反馈压缩存储实际不压缩,原因是关键配置项被隐藏 + if (provider.Prefix === 'compress') { + for (const param of storageParams) { + if (param.name === 'remote' || param.name === 'compression_mode' || param.name === 'compression_level') { + param.advanced = false + } + } + } + rcloneStorageInfoList.push({ label: 'storage.' + normalizeStorageId(provider.Prefix), type: provider.Prefix,