Search Posts

Category: base64

How to upload file.mp3 to firebase storage in ionic?

I am creating an audio recording function in my ionic app. I am using media plugin: $ ionic cordova plugin add cordova-plugin-media $ npm install –save @ionic-native/media I can record the audio and play it successfully like this: constructor(private media: Media,private base64: Base64) { this.file = this.media.create(‘file.mp3’); } record_audio(){ this.file.startRecord(); } to uplaod to firebase I cannot directly upload the file.mp3, looks like I need to convert it to Blob or base64 first so I […]