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

ERROR: Download error code: 22 #214

Open leandroz opened 7 years ago

leandroz commented 7 years ago

Hi!, first thanks for this awesome library! I used it in a couple of projects already and its super useful.

I am getting this error: ERROR: Download error code: 22, while trying to store a blob. Basically I am getting a base64 string from the server, then converting to a blob and then trying to store that into the filesystem, is it a better way? maybe passing the base64 string directly?

Thanks in advance!

csicky commented 6 years ago

I also got this error and found out that it means the quota has been exceeded. I would like to know what is the best to do in this case because I didn't got a prompt from Chrome to allow more storage. This means my users will not get the prompt either. Should I re prompt the user when I catch this specific error? Or should ImgCache do the prompt automatically when the error happens?

On Cordova seems to be working without issues for the same images with same sizes.

kotrakrishna commented 6 years ago

Got the same error. Not sure what it means.

chrisben commented 6 years ago

According to @csicky it means the quota has been exceeded. You can set a higher value for the local storage quota if the default 10MB is too low for you, see: ImgCache.options.chromeQuota