Skip to content

Investigate Blob support #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cyrilletuzi opened this issue Feb 7, 2019 · 2 comments
Closed

Investigate Blob support #80

cyrilletuzi opened this issue Feb 7, 2019 · 2 comments
Assignees

Comments

@cyrilletuzi
Copy link
Owner

cyrilletuzi commented Feb 7, 2019

Currently, the lib doesn't officialy support Blob.

If you try to store Blob, the lib will be OK but:

  • it will be fine in Chrome/Firefox/Safari desktop indexedDb
  • won't fail but won't be usable in Safari Mobile indexedDb which doesn't support this feature (could be done via base64 encoding)
  • need to check in IE/Edge indexedDb
  • it won't fail but won't be usable in localStorage, where an asynchronous conversion would be needed (via FileReader)
  • Blob are not supported at all in IE9

Please comment if this feature would be useful to. you. Not planned currently as it would be a huge work and not even sure it's possible to make it work everywhere.

@blochealth
Copy link

I would like this feature, but at a minimum can it throw an error now in localStorage if the type is Blob? Got confused when it didn't work as expected when simpler keyed items did.

@cyrilletuzi cyrilletuzi self-assigned this May 17, 2019
@cyrilletuzi cyrilletuzi added this to the v8.0 milestone May 17, 2019
@cyrilletuzi
Copy link
Owner Author

Decisions taken:

  • v8 of the lib will now throw when trying to store data that can't be serialized in localStorage
  • Safari issues (if still present) are browsers bug, it's not to this lib to take action
  • IE9 is not a concern for the lib, as code with Blob would completely fail in IE9, so it's to the user to check Blob support and still wants IE9 support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants