convert...
This commit is contained in:
parent
358b8f2273
commit
1dd8e119bf
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user