I want to use Salesforce DataLoader to extract and upload Documents. However, I don't understand in which format Blob Body values are stored, is it Base64 encoded?

Looks like yes, but why it is not documented anywhere?

Can I use the same Base64 encoding to insert or update Documents as well?


You can export files in base-64 format, but you can only import files using files, as documented in Uploading Attachments. Basically, the Body needs to be specified as a file path. The three required fields are Name, ParentId, and Body. For Documents, you need a FolderId, Name, and Body.

  • Good catch. I have seen this article before, but it refers Attachments and I need information about Documents. How should I know that what is written for Attachment is also valid for Documents? I would prefer is there was some proper documentation on that. – Patlatus Jan 13 '17 at 16:23

No, I can't use Base64 to insert Documents. Received Exceeded Max Field size

enter image description here

Also there is mention in the documentation that VersionData for ContentVersion is automatically converted into Base64, probably the same is valid for Body of Document. Strange, why didn't they mentioned Document Body conversion as well.

• VersionData - complete file path on your local drive (for uploading documents only). Note: Files are converted to base64 encoding on upload. This action adds approximately 30% to the file size.

Documentation, page 16 (showing 20/50 in the PDF viewer)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.