angularjs - How to save base64 images into device using Cordova application? -
how save base64 images device gallery using cordova application.i getting base64 text response.
you can find here http://ionicframework.com/docs/v2/native/base64-to%20gallery/
window.requestfilesystem(localfilesystem.persistent, 0, function (filesystem) { var filetransfer = new filetransfer(); var uri = encodeuri("http://www.example.com/image"); var path = filesystem.root.tourl() + "appname/example.jpg"; filetransfer.download( uri, path, function(entry) { refreshmedia.refresh(path); // refresh image gallery }, function(error) { console.log(error.source); console.log(error.target); console.log(error.code); }, false, { headers: { "authorization": "dgvzdhvzzxjuyw1lonrlc3rwyxnzd29yza==" } } ); });
Comments
Post a Comment