fix: delete file

This commit is contained in:
Timothy Jaeryang Baek
2024-12-28 17:40:00 -08:00
parent e6e8978f78
commit 76decdba2a
3 changed files with 4 additions and 9 deletions

View File

@@ -147,8 +147,10 @@ class StorageProvider:
return self._get_file_from_s3(file_path)
return self._get_file_from_local(file_path)
def delete_file(self, filename: str) -> None:
def delete_file(self, file_path: str) -> None:
"""Deletes a file either from S3 or the local file system."""
filename = file_path.split("/")[-1]
if self.storage_provider == "s3":
self._delete_from_s3(filename)