Integrate Qiniu upload service and update configuration

- Added Qiniu configuration options to .env.example and config.go for file uploads.
- Refactored main.go to include new Qiniu service and upload handler.
- Updated route registration to accommodate the new upload handler.
- Enhanced documentation to include references for Qiniu upload functionality.
- Removed legacy authentication handler and services to streamline the codebase.
This commit is contained in:
nepiedg
2025-12-31 03:18:03 +00:00
parent 2884f54666
commit cd7ae5ac56
14 changed files with 320 additions and 9 deletions
+13
View File
@@ -16,3 +16,16 @@ JWT_SECRET=your-secret-key-change-in-production
SHORT_VIDEO_API_KEY=replace-with-real-key
SHORT_VIDEO_FREE_QUOTA=20
SHORT_VIDEO_TIMEOUT_SECONDS=5
# 七牛直传配置(Kodo
QINIU_ACCESS_KEY=replace-with-access-key
QINIU_SECRET_KEY=replace-with-secret-key
QINIU_BUCKET=replace-with-bucket
# 上传地址:可保持默认(自动调度),也可以配置具体 Region 的 up 域名
QINIU_UPLOAD_URL=https://upload.qiniup.com
# CDN 域名(可选):用于拼接最终访问地址,例如 https://cdn.example.com
QINIU_CDN_DOMAIN=
# 上传 key 前缀(可选)
QINIU_KEY_PREFIX=uploads/
# token 有效期(秒)
QINIU_TOKEN_EXPIRE_SECONDS=300