I'm building a Google Drive integration to push files over. I have it working--with one significant problem. When I query VersionData from ContentVersion it return a blob.
When I pass my blob in the body of a call, it passes the string [Blob ####]. Normally, I'd use the Blob.toString() method, but this only works if the file is UTF-8 encoded, which I can't guarantee. If it isn't UTF-8, it throws this:
BLOB is not a valid UTF-8 string
Does anyone have any recommendations for how to get the actual file body? Encoding to base 64 (ie EncodingUtil.Base64Encode) does not work.