imgcache.js
imgcache.js copied to clipboard
Using the cache with fileOpener2
Hi, would you happen to know why this doesn't work? Can't seem to open any files I pass to the file opener. Other file types and operations with the urls in my app have worked, so not sure what the situation with pdfs is.
ImgCache.getCachedFileURL(url, function(original, cached) {
console.log('** original: ' + original + '\ncached: ' + cached);
cordova.plugins.fileOpener2.open(
cached, 'application/pdf', {
error : function(e) {
console.log('Error status: ' + e.status + ' - Error message: ' + e.message);
},
success : function () {
console.log('file opened successfully');
}
}
);
});
Btw, fileOpener2 says it is successful, but the pdf reader can't open the file, it says it can't access the file or something like that.
How do I get the real path to the cached files? The two calls, getCachedFileURL, and getCachedFile don't provide this information, the give something like "/imgcache/...". This isn’t good enough, still haven't found the files. :(