Smile-SA / cordova-plugin-fileopener

24 stars 28 forks source link

Use for App Update #14

Open prolog8 opened 7 years ago

prolog8 commented 7 years ago

Hi,

I use fileopener for Auto App Update, the code like that

window.cordova.plugins.FileOpener.openFile( 'http://xxxx/ver1024.apk', function(){ alert('download now.') }, errorHandler);

But, when I try to call openFile, it always give me open the older version in cache.

May I force download when call openFile each time.

Thank you. Willow

marob commented 7 years ago

Hi,

the code uses the filename as identifier and assumes it will never change: it checks if the file is in cache (i.e.: has already been downloaded) before downloading it again.

Several solutions:

Regards