Closed adamscybot closed 8 years ago
This module serializes all blobs as strings due to limitations of the WebSQL API and the Cordova plugin API. In fact due to limitations of the WebView itself, there is no way around serialization, so blobs of a certain size will always cause crashes.
My recommendation is to break up large blobs into smaller ones and insert them as separate columns or separate rows. Sorry about that. It's definitely a pain, but it's unfixable AFAIK.
I actually have worked around this by dumping string conversion and instead using Base 64. So I guess it's not the size alone but the size + string conversion? Either that or certain characters in the output crash when they get serialised to JSON, which has been documented other older plugin and then fixer with url encoding. This still didn't work for me though.
Yeah, it's hard to say. Everything has to be serialized, though. In general if you want to store big blobs, the best solution is storing blobs in IndexedDB on Android, and wait for Safari to implement blobs for IndexedDB on iOS.
I have a situation where I want to retrieve a large blob (its an image) from an sql database. When I do this, the thread crashes: