feat: local storage logic & endpoints

This commit is contained in:
Senko-san
2026-06-07 15:34:06 +03:00
parent dfd512a13f
commit 81ea93c371
23 changed files with 945 additions and 18 deletions
+16
View File
@@ -0,0 +1,16 @@
"""File storage provider — singleton factory."""
from app.core.config import get_settings
from app.infrastructure.storage.local import LocalFileStorage
_storage: LocalFileStorage | None = None
def get_file_storage() -> LocalFileStorage:
global _storage
if _storage is None:
settings = get_settings()
if settings.storage_backend == "s3":
raise NotImplementedError("S3 storage not yet implemented.")
_storage = LocalFileStorage(settings.media_path)
return _storage