How do I save and restore a File object in local storage

You cannot serialize file API object.

Not that it helps with the specific problem, but …
Although I haven’t used this, if you look at the article it seems that there are ways (although not supported yet by most browsers) to store the offline image data to some files so as to restore them afterward when the user is online (and not to use localStorage)

Leave a Comment