This commit is contained in:
2025-10-14 15:37:37 -05:00
commit 6821e717cd
39 changed files with 3346 additions and 0 deletions

17
app/storage/factory.py Normal file
View File

@@ -0,0 +1,17 @@
from app.storage.base import StorageBackend
from app.storage.s3_backend import S3Backend
from app.storage.minio_backend import MinIOBackend
from app.config import settings
def get_storage_backend() -> StorageBackend:
"""
Factory function to get the appropriate storage backend
based on configuration
"""
if settings.storage_backend == "s3":
return S3Backend()
elif settings.storage_backend == "minio":
return MinIOBackend()
else:
raise ValueError(f"Unsupported storage backend: {settings.storage_backend}")