Moved to S3

This commit is contained in:
2025-12-16 01:25:21 +07:00
parent c7966656d8
commit 87ecd9756c
15 changed files with 446 additions and 56 deletions

View File

@@ -52,5 +52,7 @@ class User(Base):
@property
def avatar_url(self) -> str | None:
if self.avatar_path:
return f"/uploads/avatars/{self.avatar_path.split('/')[-1]}"
# Lazy import to avoid circular dependency
from app.services.storage import storage_service
return storage_service.get_url(self.avatar_path, "avatars")
return None