Cordova-plugin-camera Convert image base64 to object File

Im using cordova-plugin-camera and the plugin returns the image in base64 format. The API that i need to sent this image, only accepts object File.

Searching how to convert a base64 format to object File, all the answers are using the javascript constructor new File()

Testing in browser works fine, returns a object File. But when testing in ionic view on iphone, returns a object Object and not a object File.

Any idea how to solve this? Or cordova-plugin-camera have some method to return object File and not base64 format?


Having the same problem. Did you fix it ?

Set the correct destinationType in the camera plugin options to 1. I think 0 is base64, 1 is file uri.