How do you convert binary data to string on the client? I have tried all the EJSON* functions with no luck.
I am trying to save images as binary in mongo. First I remove the part with “data:image/jpeg;base64,” then I save the rest with EJSON.newBinary(data). I figure - either I’m doing something wrong or the client can’t convert binary. It works if I don’t strip out the “data:image…” part but then it gets stored as a string which is unnecessarily bigger.