Skip to content

Instantly share code, notes, and snippets.

@sfdcale
Created August 10, 2021 04:23
Show Gist options
  • Save sfdcale/659160acc3150b863617bb28ab93160d to your computer and use it in GitHub Desktop.
Save sfdcale/659160acc3150b863617bb28ab93160d to your computer and use it in GitHub Desktop.
How to Insert Blob data into ContentVersion using curl
curl -i --location https://acme.my.salesforce.com/services/data/v50.0/sobjects/ContentVersion \
--header "Authorization: Bearer 00D051234564atA!abcdef" \
--form entity_content='{ "PathOnClient": "Statement.pdf" };type=application/json' \
--form VersionData="@Statement.pdf;type=application/octset-stream;"
# Make sure that there is a file named `Statement.pdf` in the directory where this command is run from.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment