ngCordova file and filePath


#1

I was using ImgCache.js to use images for offline use in my app.
Decided to use ngCordova. I am stuck on the filepath in the example code on ngCordova website for file download. How do I get the file path to use in the code provided as example?

// parameters: source, filePath, trust all hosts (boolean), options
  $cordovaFile.downloadFile(source, **filePath**, true, options).then(function(result) {
      // Success! 
  }, function(err) {
      // An error occured. Show a message to the user
  });

#2

Hi, could you work it out? I’m having the same issue. Thanks!


#3

I couldn’t find the solution. I am using the file plugin and imgcache.js without the ngCordova now.


#4

Do you have an example of this workaround? Thanks!


#5

same issue here,could you give me the solution


#6

+1… does anybody know anything new?


#7

[quote]
$cordovaFile.downloadFile(value.snapshot.thumb, cordova.file.applicationStorageDirectory + directory +’/’+ uuid +’/slideThumb’+ i +’.jpg’, true, options) // i just created an empty Js object for Options
.then(function(result) {
console.log(‘dowload finish’);
}, function(err) {
console.log(‘Downoad Fail’);
}, function (progress) {
console.log(‘Download in progress’);
});[/quote]

I used something similar to this and everything worked fine, the only problem i met was when i decided to delete some files and directory i saved in my app folder. If anyone has tips for it ill take it.