feat: 文件上传所需要的环境变量
This commit is contained in:
@@ -11,3 +11,5 @@ LLM_KEY_DEEPSEEK=sk-a89d0ff9421a43fca5f0xxxxxxxxxxxx # Deepseek模型服务
|
|||||||
|
|
||||||
SERVER_PORT = 7004 # 服务启动端口
|
SERVER_PORT = 7004 # 服务启动端口
|
||||||
SERVER_ENABLE_CORS = False # 是否允许跨域
|
SERVER_ENABLE_CORS = False # 是否允许跨域
|
||||||
|
SERVER_FILE_SAVE_PATH=/www/wwwroot/web/web/upload_file/ # 文件保存在服务器上的路径
|
||||||
|
SERVER_FILE_PUBLIC_PATH=/web/upload_file/ # 文件在浏览器上的访问路径
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ class EnvSettings(BaseSettings):
|
|||||||
|
|
||||||
server_port: int = Field(..., env="SERVER_PORT")
|
server_port: int = Field(..., env="SERVER_PORT")
|
||||||
server_enable_cors: bool = Field(..., env="SERVER_ENABLE_CORS")
|
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:
|
class Config:
|
||||||
env_file = ".env"
|
env_file = ".env"
|
||||||
|
|||||||
Reference in New Issue
Block a user