cordova-plugin-jc-googledrive
cordova-plugin-jc-googledrive copied to clipboard
Download, Error file reade
When I use downloadFile
to download a text file , I get an error.
Code I am using:
var name="save.txt";
window.plugins.gdrive.downloadFile((cordova.file.cacheDirectory + name).replace(/^file:\/\//,''),$scope.options.check,
function (response) {
alert(JSON.stringify(response)); <---------- ID FILE
$timeout(function(){
$cordovaFile.readAsText(cordova.file.cacheDirectory,name).then(function(result) {
alert(result);
items = JSON.parse(result);
alert(items);
}, function(err) {
alert(err); // <------ **HELP ME**
});
},400);
},
function (error){
}
);