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

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. (

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.