cordova-plugin-jc-googledrive icon indicating copy to clipboard operation
cordova-plugin-jc-googledrive copied to clipboard

Download, Error file reade

Open jet174 opened this issue 7 years ago • 0 comments

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){

                         }
                      );

image

jet174 avatar Sep 11 '17 14:09 jet174