Moved to S3
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user