项目初始化

This commit is contained in:
2026-01-13 17:00:49 +08:00
commit d2352318f4
27 changed files with 4343 additions and 0 deletions

40
config/config.yaml Normal file
View File

@@ -0,0 +1,40 @@
site:
name: "文件暂存柜"
description: "临时文件中转服务"
security:
# 管理员密码的 bcrypt 哈希。如果首次运行且此处为空,系统将自动生成随机密码并打印在控制台
admin_password_hash: "$2a$10$Bm0TEmU4uj.bVHYiIPFBheUkcdg6XHpsanLvmpoAtgU1UnKbo9.vy" # 默认密码: admin
pickup_code_length: 6
pickup_fail_limit: 5
jwt_secret: "file-relay-secret"
upload:
max_file_size_mb: 500
max_batch_files: 20
max_retention_days: 30
storage:
type: "local"
local:
path: "storage_data"
webdav:
url: "https://dav.example.com"
username: "user"
password: "pass"
root: "/file-relay"
s3:
endpoint: "s3.amazonaws.com"
region: "us-east-1"
access_key: "your-access-key"
secret_key: "your-secret-key"
bucket: "file-relay-bucket"
use_ssl: true
api_token:
enabled: true
allow_admin_api: false
max_tokens: 20
database:
path: "file_relay.db"