fix: persist avatar data and uploads

This commit is contained in:
stefanfeng
2026-08-19 14:44:58 +08:00
parent c5bfa47a23
commit 68ea87e1b2
4 changed files with 14 additions and 3 deletions
@@ -15,7 +15,7 @@ import embeddings
router = APIRouter()
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
UPLOAD_DIR = os.path.join(BASE_DIR, "uploads")
UPLOAD_DIR = os.path.abspath(os.getenv("UPLOAD_DIR", os.path.join(BASE_DIR, "uploads")))
os.makedirs(UPLOAD_DIR, exist_ok=True)
ALLOWED_EXT = {".md", ".txt", ".pdf", ".doc", ".docx", ".xlsx"}