diff --git a/chain_service/services/file_uploader.py b/chain_service/services/file_uploader.py index 22486bd..aa1e0a2 100644 --- a/chain_service/services/file_uploader.py +++ b/chain_service/services/file_uploader.py @@ -41,7 +41,7 @@ class FileUploaderService: if uploaded_file: return - if file_url.endswith(".mp3"): + if file_url.endswith(".mp3") or file_url.endswith(".ogg"): converted_content = await self.audio_converter_service.mp3_to_ogg( mp3=BytesIO((await self.client.get(file_url)).read()) @@ -51,11 +51,6 @@ class FileUploaderService: file_content=converted_content ) - elif file_url.endswith(".ogg"): - uploaded_file_id = await self.planfix_client.upload_file( - file_content=BytesIO((await self.client.get(file_url)).read()) - ) - else: uploaded_file_id = await self.planfix_client.upload_file_from_url( file_url