1

Looking to the community for some help on this one..

I've been using postman to deliver a multipart message with the binary data to upload a document to a document folder through the REST API.

The document is loading fine but is always corrupted. I'm unable able to create/convert to the right binary for the document to load with content successfully.

Any advice on how to convert the content of the document to the appropriate binary string so that the document loads successfully without getting corrupted? Ideally through postman for a POC.

Note: I'm following the instructions according to this wiki: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm

3
  • are you sure that you are decoding the blob data using base64Decode method of EncodingUtil before saving it to the file body?
    – ipradhansk
    Commented Dec 11, 2017 at 16:45
  • The ask is that the REST API be leveraged to insert a document, so this would be outside of Apex.
    – Tony H.
    Commented Dec 12, 2017 at 3:21
  • You ever figure this out? I was successfully able to upload base64 encoded data without multipart message. But I don't know how to get the binary format data for the multi-part message version. Commented Nov 9, 2021 at 18:15

0

You must log in to answer this question.

Browse other questions tagged .