phonegap / phonegap-plugin-contentsync

Download and cache remotely hosted content
Apache License 2.0
206 stars 98 forks source link

404 not found #161

Closed tomasantunes closed 7 years ago

tomasantunes commented 7 years ago

I followed the sample code but I can't read any files. I get a 404 not found error.

Here is the code:

var sync = ContentSync.sync({
  src: 'http://example.com/zipfile',
  id: 'zip1',
  copyRootApp: true,
  type: 'replace',
});

sync.on('complete', function(data) {
  ContentSync.loadUrl("file://"+data.localPath + "/www/index.html");
  document.location = data.localPath + "/www/index.html";
});
imhotep commented 7 years ago

@tomasantunes Have you tried just using document.location?

macdonst commented 7 years ago

Closing, no response in a month.