feat: add s3 boot check option

This commit is contained in:
2026-01-17 22:16:52 +08:00
parent bb62cf4280
commit 3728a921d2
6 changed files with 20 additions and 2 deletions

View File

@@ -27,6 +27,8 @@ Region = "us-east-1"
Bucket = "quyun-assets"
Endpoint = "http://127.0.0.1:9000"
PathStyle = true
# Optional: check bucket connectivity on boot
CheckOnBoot = false
```
For AWS S3, set `Endpoint` with `https://` (e.g., `https://s3.amazonaws.com`) and keep `PathStyle` as `false` unless your provider requires path-style access.

View File

@@ -74,7 +74,7 @@ BaseURL = "http://localhost:8080/t/<tenantCode>/v1/storage"
1) 确认生产 Provider 类型已完成S3 兼容)。
2) 填好生产配置(已完成:补齐 `config.full.toml` 示例)。
3) 若是 S3 兼容:无需改代码,只做连通性检查
3) 若是 S3 兼容:已增加 `CheckOnBoot` 开关,连通性检查可在具备凭证后执行
4) 若是非 S3新增 Provider 类型并实现签名/上传/删除。
5) 回归上传链路:上传 → 回调 → 访问 URL → 删除。

View File

@@ -255,6 +255,7 @@
**技术方案(后端)**
- 通过配置注入 Provider保留本地 FS/MinIO 作为 dev fallback。
- 进度:已补齐 S3 配置示例与 `CheckOnBoot` 可选自检开关。
**测试方案**
- 本地 FS + MinIO + 真实 Provider 三套配置可用性。