🐛 Fixed storage

This commit is contained in:
Mawoka
2023-06-18 10:09:15 +02:00
parent 5f35adeec7
commit cebc43fc3b
5 changed files with 15 additions and 14 deletions
+2 -7
View File
@@ -42,13 +42,8 @@ class Storage:
else:
raise NotImplementedError(f"Backend {backend} not implemented")
async def download(self, file_name: str) -> Generator | None:
"""
No support for s3 since it doesn't make sense relaying the traffic through this backend
:param file_name:
:return:
"""
yield self.instance.download(file_name)
def download(self, file_name: str) -> Generator | None:
return self.instance.download(file_name)
async def upload(self, file_name: str, file_data: BinaryIO, mime_type: str | None = None) -> None:
return await self.instance.upload(file=file_data, file_name=file_name, mime_type=mime_type)