---
schema_version: "1"
id: b902cddb05cb50c03f4ec08e1a74c7879a333c711d0140d531833af8f89bbc41
title: Upload Files and Links with Data Loader
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/data-loader-impl/guides/data-loader/loader-content.md
canonical_url: https://developer.salesforce.com/docs/platform/data-loader-impl/guide/loader-content.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: dc9f754ddc1af4c18f472f0c1f9ee8fae1ed6573a8f7ad880d639a19bb157aa4
products:
  - Data Loader Guide
  - Platform Developer Content
---

# Upload Files and Links with Data Loader

Use Data Loader to bulk upload files and links into Salesforce.

Before uploading documents or links, note the following.

-   If you intend to upload with 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.
-   If you’re updating content that you’ve already uploaded:

    -   Perform the Insert function.
    -   Include a `ContentDocumentId` column with an 18-character ID. Salesforce uses this information to determine that you’re updating content. When you map the `ContentDocumentId`, the updates are added to the content file. If you don’t include the ContentDocumentId, the content is treated as new, and the content file isn’t updated. Visit [ContentDocument](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contentdocument.htm) to learn more.

1.  Create a CSV file with the following fields.

    |Field|Description|
    |-----|-----------|
    |`Title`|The file name|
    |`Description`|(Optional.) The file or link description. If there are commas in the description, use double quotes around the text.|
    |`VersionData`|The complete file path on your local drive (for uploading documents only). Files are converted to base64 encoding on upload. This action adds approximately 30% to the file size.|
    |`PathOnClient`|The complete file path on your local drive (for uploading documents only).|
    |`ContentUrl`|The URL (for uploading links only).|
    |`OwnerId`|(Optional). The file owner, defaults to the user uploading the file.|
    |`FirstPublishLocationId`|The library ID.|
    |`RecordTypeId`|The record type ID.  To determine the `RecordTypeId` values for your organization using Data Loader, follow the steps in [Exporting Data](https://developer.salesforce.com/docs/platform/data-loader-impl/guide/exporting-data.md). The following is a sample SOQL query: `Select Id, Name FROM RecordType WHERE SobjectType = 'ContentVersion'`|
    |`TagsCsv`|Optional tag|

    A sample CSV file is:

    ```nolang
    Title,Description,VersionData,PathOnClient,OwnerId,FirstPublishLocationId,RecordTypeId,TagsCsv
    testfile,"This is a test file, use for bulk upload",c:\files\testfile.pdf,c:\files\testfile.pdf,005000000000000,058700000004Cd0,012300000008o2sAQG,one
    ```

2.  Upload the CSV file for the ContentVersion object (see [Insert, Update, or Delete Data Using Data Loader](https://developer.salesforce.com/docs/platform/data-loader-impl/guide/inserting-updating-or-deleting-data.md)). All documents and links are available in the specified library.


