fix: deprecate minio and introduce s3 storage backend

This commit is contained in:
krau
2025-12-04 22:59:23 +08:00
parent 685047e463
commit 91814a83c7
17 changed files with 269 additions and 22 deletions

View File

@@ -93,7 +93,7 @@ session = "data/usersession.db"
- `local`: 本地磁盘
- `alist`: Alist
- `webdav`: WebDAV
- `minio`: MinIO (兼容 S3 API)
- `s3`: aws S3 及其他兼容 S3 的服务
- `telegram`: 上传到 Telegram
示例, 这是一个包含本地存储和 webdav 存储的配置:

View File

@@ -41,17 +41,18 @@ password = "your_password" # WebDAV 的密码
base_path = "/path/to/webdav" # WebDAV 中的基础路径, 所有文件将存储在此路径下
```
## MinIO (S3)
## S3
`type=minio`
`type=s3`
```toml
endpoint = "minio.example.com" # MinIO 或 S3 的端点
access_key_id = "your_access_key_id" # MinIO 或 S3 的访问密钥 ID
secret_access_key = "your_secret_access_key" # MinIO 或 S3 的秘密访问密钥
bucket_name = "your_bucket_name" # MinIO 或 S3 的存储桶名称
endpoint = "s3.example.com" # S3 的端点
region = "us-east-1" # S3 的区域
access_key_id = "your_access_key_id" # S3 的访问密钥 ID
secret_access_key = "your_secret_access_key" # S3 的秘密访问密钥
bucket_name = "your_bucket_name" # S3 的存储桶名称
use_ssl = true # 是否使用 SSL, 默认为 true
base_path = "/path/to/minio" # MinIO 中的基础路径, 所有文件将存储在此路径下
base_path = "/path/to/s3" # S3 中的基础路径, 所有文件将存储在此路径下
```
## Telegram