I’ve been playing with array buffers and they’re a pain. Handy if you want to actually parse binary data (or write it piece by piece), otherwise more trouble than they’re worth. Can’t do anything with them, can’t reliably convert them to and from formats you can do anything with.
I still have no idea what is wrong with the way you tried this, but I know how to do it a different way. No blobs, since loadOneTab() won’t take them, and no array buffers since they cause too much trouble.
canvas.toDataURL() gives a base64 encoded image
atob(dataUrl.split(’,’)[1]) gives a binary string for the image data
storageStream.getOutputStream() gets a stream you can add data to
binaryOutputStream.setOutputStream() allows binary string input to the storage stream
binaryOutputStream.writeBytes() puts the binary string into the stream
outputStream.newInputStream() can be used for your post data stream.
Simples
The good news is it works. The bad news is it isn’t exactly elegant. Probably faster than using blobs and array buffers though.