From 5013218b244a31e778d3fdac357aeecbc35a76a2 Mon Sep 17 00:00:00 2001 From: martsforever Date: Thu, 2 Apr 2026 14:58:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=89=80=E9=9C=80=E8=A6=81=E7=9A=84=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 2 ++ app/config/env.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.env.example b/.env.example index b6636fd..369a0f7 100644 --- a/.env.example +++ b/.env.example @@ -11,3 +11,5 @@ LLM_KEY_DEEPSEEK=sk-a89d0ff9421a43fca5f0xxxxxxxxxxxx # Deepseek模型服务 SERVER_PORT = 7004 # 服务启动端口 SERVER_ENABLE_CORS = False # 是否允许跨域 +SERVER_FILE_SAVE_PATH=/www/wwwroot/web/web/upload_file/ # 文件保存在服务器上的路径 +SERVER_FILE_PUBLIC_PATH=/web/upload_file/ # 文件在浏览器上的访问路径 diff --git a/app/config/env.py b/app/config/env.py index 89db862..8649ec4 100644 --- a/app/config/env.py +++ b/app/config/env.py @@ -16,6 +16,8 @@ class EnvSettings(BaseSettings): server_port: int = Field(..., env="SERVER_PORT") server_enable_cors: bool = Field(..., env="SERVER_ENABLE_CORS") + server_file_save_path: str = Field(..., env='SERVER_FILE_SAVE_PATH') + server_file_public_path: str = Field(..., env='SERVER_FILE_PUBLIC_PATH') class Config: env_file = ".env"