Query for available space

109 views
Skip to first unread message

pauljoh...@gmail.com

unread,
Nov 7, 2015, 6:32:30 AM11/7/15
to Dexie.js
Hi, I'm evaluating a couple of IndexedDB wrappers- one thing I need to be able to do is store large files. Is it possible to query the database for the amount of space available on the client?

Looks like there's some different methods of doing this in Chrome & Firefox (see http://stackoverflow.com/questions/26257183/detecting-available-storage-with-indexeddb & http://stackoverflow.com/a/18350531/4121257)


Thanks,
Paul.

David Fahlander

unread,
Jan 5, 2016, 7:24:15 AM1/5/16
to Dexie.js, pauljoh...@gmail.com
There's no quota limit API in indexedDB so this cant be accomplished on all devices. If you handle returned promises or subscribe to the generic promise failure event Dexie.on.error, a QuotaExceededError will be fired when an operation has failed due to execute.
Reply all
Reply to author
Forward
0 new messages