Converting binary image file (Blob) to base64 string on PlayBook?
I need to upload image files from the PlayBook to a webserver.
When using BB10, it's pretty easy, basically just using reader.readAsBinaryString(file) to get the file as a string, encode it into Base64, then send it with xml.send(fileData). That works fine with my Z10.
But the PlayBook seems to have it's own file handling system which doesn't work the same as BB10. I can read the image file just fine with blackberry.io.file.readFile(path, pbOpenImageFile), but that just gives me the binary Blob. How do I get that Blob converted to a Base64 string for sending with xml.send(fileData)?
blackberry.utils.blobToString(blobData) doesn't seem to work, at least not with my image data (works fine with my text files though). It also apparently has a size limit which could be a problem with images anyway.
Is there any way to get that Blob converted to a Base64 string?