0

I have some small place-keeper files (ContentDocument/ContentVersion) loaded by some existing code but want to replace the content with the actual PDF/Video data. This is to pre-load scratch orgs with some standard data that totals maybe 50 Mbytes spread across 20 files.

Does anyone have that working using e.g.:

sfdx force:data:bulk:upsert

with the binary data as base 64 in the CSV or the JSON equivalent? Or is there a better mechanism to use for this task of updating Salesforce Files?

PS

Just read in the Bulk API Developer Guide that:

Currently base64 fields are not supported in queries with the Bulk API.

Does that suggest base64 does work in updates?

4
  • How does Bulk API not supporting base64 fields in a query hurt your chances of upserting the document?
    – identigral
    Commented Aug 4, 2021 at 17:01
  • Hi @identigral it doesn't was just suggesting that it implies that the upsert of base64 will work. But wondering about whether multiple MBytes are handled by this API and its SFDX wrappers?
    – Keith C
    Commented Aug 4, 2021 at 18:48
  • 1
    You may have a look at SFDX Data Move Utility, it can handle File and Attachment, so maybe it works with ContentVersion. help.sfdmu.com/key-features Commented Aug 5, 2021 at 12:13
  • 1
    Thanks @NicolasVuillamy - helpful.
    – Keith C
    Commented Aug 5, 2021 at 13:49

0

You must log in to answer this question.