Add build_full_path method to LocalStorageService and stub method to StorageService
This commit is contained in:
parent
e63e51cc5c
commit
42356fc379
2 changed files with 7 additions and 0 deletions
|
|
@ -15,6 +15,10 @@ class LocalStorageService(StorageService):
|
|||
self.data_dir = Path(settings_service.settings.CONFIG_DIR)
|
||||
self.set_ready()
|
||||
|
||||
def build_full_path(self, flow_id: str, file_name: str) -> str:
|
||||
"""Build the full path of a file in the local storage."""
|
||||
return str(self.data_dir / flow_id / file_name)
|
||||
|
||||
async def save_file(self, flow_id: str, file_name: str, data: bytes):
|
||||
"""
|
||||
Save a file in the local storage.
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ class StorageService(Service):
|
|||
self.session_service = session_service
|
||||
self.set_ready()
|
||||
|
||||
def build_full_path(self, flow_id: str, file_name: str) -> str:
|
||||
pass
|
||||
|
||||
def set_ready(self):
|
||||
self.ready = True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue