function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sivaextsivaext 

insert content version using REST API

Hi , 

I am trying insert content version using REST API. I have followed all steps mentioned in REST API doc. (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm#inserting_a_contentversion).

I am able to insert content version in salesforce but when I download, getting error image is damaged.

Please help me how to insert binary data here to test.
--boundary_string Content-Disposition: form-data; name="entity_content"; Content-Type: application/json
{ "ContentDocumentId" : "069D00000000so2", "ReasonForChange" : "Marketing materials updated", "PathOnClient" : "Q1 Sales Brochure.pdf" }
--boundary_string Content-Type: application/octet-stream Content-Disposition: form-data; name="VersionData"; filename="Q1 Sales Brochure.pdf"

Binary data goes here.

--boundary_string--