chrisben / imgcache.js

JS library based on the File API to cache images for offline recovery (target: cordova/phonegap & chrome)
Other
826 stars 216 forks source link

Fixes the issue "Failed to load resource" #250

Closed vikramjo closed 2 years ago

vikramjo commented 4 years ago

Without this change the cached file path shows up in the following format (for cordova-ios 6.1.0, with scheme set to cdvfile and hostname set to localhost in config file):

cdvfile://localhost/library-nosync/imgcache/hashedfilename.jpg

System cannot find the file there. Hence, it throws the error "Failed to load resource: the server responded with a status of 404 ()"

After making this change, the cached file path shows up as:

cdvfile://localhost/_appfile/var/mobile/Containers/Data/Application/approotdirectoryname/Library/NoCloud/imgcache/hashedfilename.jpg

which is where the cached file is actually located.

weareu commented 2 years ago

Please merge this pull request