I have a .csv file which has a column containing base64 string equivalent of a image. Anyway we can load the csv file into Attachments object or ContentVersion object using apex dataloader? I know if we have the actual attachment file itself in a folder on your local computer you can use dataloader, but base64 csv column mapping to VersionData on ContentVersion object throws error. Any help is appreciated.
You can use Data Loader to bulk upload documents and links into libraries in Salesforce CRM Content. Before uploading documents or links, note the following.
- If you intend to upload via the Bulk API, verify that Upload Bulk API Batch as Zip File on the Settings > Settings page is enabled.
- When you upload a document from your local drive using Data Loader, specify the path in the VersionData and PathOnClient fields in the CSV file. VersionData identifies the location and extracts the format, and PathOnClient identifies the type of document being uploaded.
- When you upload a link using the Data Loader, specify the URL in ContentUrl. Don’t use PathOnClient or VersionData to upload links.
The minimum set of columns required for a Content import are:
TITLE = User friendly name of the file, can be anything, but usually the filename without any folder (path) information.
PATHONCLIENT = Fully qualified file name including ALL path information.
VERSIONDATA = exactly the same as PATHONCLIENT.
FIRSTPUBLISHLOCATIONID = Salesforce ID of the Library where the document should be loaded. If you don’t put this in the file, then your files will be uploaded to your personal library which must be wrong.