Newer Version Available
Upload Attachments
Use Data Loader to upload attachments to Salesforce.
Before uploading attachments, note the following:
- If you intend to upload with Bulk API, verify that Upload Bulk API Batch as Zip File on the page is enabled.
- If you are migrating attachments from a source Salesforce org to a target org, begin by requesting a data export for the source org. On the Schedule Export page, select Include Attachments to include the Attachment.csv file in your export. You can use this CSV file to upload the attachments. For more information on the export service, see Export Backup Data from Salesforce.
- Confirm that the CSV file you want to use for attachment
importing contains these required columns. Each column
represents a Salesforce field.
- ParentId—Salesforce ID of the parent record
- Name—Name of the attachment file, such as myattachment.jpg
- Body—Absolute path to the attachment on
your local driveMake sure that the values in the Body column contain the full path of the attachments on your computer. For example, if an attachment named myattachment.jpg is the folder C:\Export, Body must specify C:\Export\myattachment.jpg. Your CSV file looks like this example:
The CSV file can also include other optional Attachment fields, such as Description.
- Proceed with an insert or upsert operation (see Insert, Update, or Delete Data Using Data Loader). For the select data objects step, select Show all Salesforce objects and the attachment object name in the list.