ifixkart-backend/app/storage/storage_provider.py

16 lines
441 B
Python

from abc import ABC, abstractmethod
class StorageProvider(ABC):
@abstractmethod
def save_file(self, file_bytes: bytes, filename: str, folder: str) -> str:
"""
Saves file bytes and returns the stored path or URI.
"""
pass
@abstractmethod
def delete_file(self, storage_path: str) -> bool:
"""
Deletes the file from storage. Returns True if successful.
"""
pass