The open-source AI voice studio. Clone, dictate, create.
fix(backend): guard avatar upload against a missing filename (#954)
jojo6a6f4643da43
diff --git a/backend/routes/profiles.py b/backend/routes/profiles.pyindex e0f7f7fd..68e5f2af 100644--- a/backend/routes/profiles.py+++ b/backend/routes/profiles.py@@ -232,7 +232,7 @@ async def upload_profile_avatar(db: Session = Depends(get_db),):"""Upload or update avatar image for a profile."""- with tempfile.NamedTemporaryFile(delete=False, suffix=Path(file.filename).suffix) as tmp:+ with tempfile.NamedTemporaryFile(delete=False, suffix=Path(file.filename or "").suffix) as tmp:content = await file.read()tmp.write(content)tmp_path = tmp.name