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
});
[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.