You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to embed a small SQLite database as a base64 encoded data uri in a web page. I'd like to be able to open the database via passing in the data uri, or the actual decoded blob.
I think this works out of the box, just calling SQL.open(data). To open a database from a file, so something like:
var input = document.querySelectorAll('#file-input')[0].files[0];
var reader = new FileReader();
reader.onload = function(e) {
// reader.result is your data blob.
};
reader.readAsBinaryString(input);
Perhaps reader.readAsDataURL() might help you also.
I want to embed a small SQLite database as a base64 encoded data uri in a web page. I'd like to be able to open the database via passing in the data uri, or the actual decoded blob.
See also: dataURItoBlob
The text was updated successfully, but these errors were encountered: