inserting blob into sqlite from safari browser using html5
To read the PDF from disk, you would use the FileReader
interface of the File API. See http://www.html5rocks.com/en/tutorials/file/dndfiles/ for a tutorial.
The WebSQL API does not have data types for accessing blobs, so you have to convert the file contents to a textual INSERT command.
In SQLite, a BLOB literal is a string containing hexadecimal byte values, prefixed with an x
, like this:
INSERT INTO mytable(myblob) VALUES(x'255044462d312e340d25e2e3cfd30d0a...');