localForage/localForage

Support for storing File objects

Open

#414 geöffnet am 4. Aug. 2015

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1.260 Forks)batch import
driver supportenhancementhelp wanted

Repository-Metriken

Stars
 (24.184 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hello!

I'm having an issue with storing file objects in WebSQL. I am pulling file objects from a file input element and then store them in a table using localForage. In a browser that fully supports IndexedDB, like Chrome desktop / Firefox desktop / IE11 desktop, retrieving a File object works as expected i.e. I am able to use the retrieved File object in my code. In a browser that reverts back to WebSQL, like Safari mobile, the value I get upon iterating through the objects in the DB is an Object type that doesn't contain references to the File object. Does this have anything to do with the fact that objects are serialised when inserted in a WebSQL table and deserialised upon retrieval? Is there any way I can bypass that and, more importantly, is that recommended?

Thank you, Ovidiu

Contributor Guide