Upload webm as mp3
We're making a chat application in Flutter that features voice recording. On the web client, the files are encoded as webm and those are not supported for playback on iOS.
I guess I can use the transformation tools to re encode the webm to mp3 on download - but this is probably not optimal, is there a way to automatically convert the webm to mp3 on upload?
Answers
-
Hi Yohami,
Thank you for reaching out! The easiest way to convert on upload is to create an upload preset where a format can be defined such as mp3 and this will be the converted format before the asset is saved in Cloudinary.
Follow the steps here on how to create an upload preset:
Once that upload preset is created, then use that upload preset during upload:
Let us know if you need further assistance.
0 -
Thanks, I made it work with unsigned uploads. How do I pass the preset for signed uploads? I guess inside of optParams?
optParams : { "uploadPreset" : "myPreset" }
?0 -
Hi there,
An upload preset is required for unsigned uploading, and optional for signed uploading, therefore it should work the same way. You can see more about the upload API method here:
If you encounter any issues with this, please feel free to create a support ticket at support.cloudinary.com and paste the code you're using, and let us know what is the cloud name for your account so that we can investigate it for you!Regards,
Victor0