Closed mudcube closed 8 years ago
I think coverting to/from base64 encoded "blobs" is the way to go. That makes it transparent to users of the library.
When you get a chance could you take a look at my pull request which addresses this? https://github.com/ebidel/idb.filesystem.js/pull/31
Although Safari/iOS supports IndexedDB they do not support Blob storage.
One solution is the following steps:
(a) Test for blob support in IndexedDB. The drawback here is this means requestFileSystem polyfill will not be available until support is detected, which may be after window.onload. (b) Convert from BlobToBase64 when FileWriter.write is executed (c) Convert from Base64ToBlob when a new FileEntry is created
Otherwise things are working nicely across browsers!