Newer Version Available

This content describes an older version of this product. View Latest

File Input

A new file.
To upload a file, provide the binary file in a multipart/form-data body part where name="fileData". See Uploading Binary Files.
Root XML tag
<fileInput>
JSON example for creating a file
1{ 
2   "desc":"Employee Survey Results",
3   "title":"emp_surv_results"
4}
JSON example for creating a reference to an external file
1{ 
2   "repositoryId":"0XCB00000004CHJ",
3   "repositoryFileId":"document:1AnPHWYq_j56yryuRbxiVp93rD2qGqNWx7yZHvidxDpQ"
4}
Properties
Name Type Description Required or Optional Available Version
content​ModifiedDate String File-specific last modified date that can be used to set a client-side modified date. Specify the date in ISO 8601 format. Optional 32.0
desc String Description of the file to be uploaded. Optional 24.0
includeExternal​FilePermissions​Info Boolean Specifies whether to include permission information, such as whether the file is shared and what are the available permission types, for external files.

This property can be used with POST requests to /connect/files/users/userId, but not with POST requests to /connect/files/fileId.

Optional 35.0
isInMyFileSync Boolean true if the file is synced with Salesforce Files Sync; false otherwise.

Salesforce Files Sync was retired on May 25, 2018.

Note

Optional 31.0
isMajorVersion Boolean true if the file is a major version; false if the file is a minor version. Major versions can’t be replaced. Optional 31.0
parentFolderId String ID of the containing folder. Optional 31.0
repository​FileId String ID of the external file.

This property can be used with POST requests to /connect/files/users/userId, but not with POST requests to /connect/files/fileId.

If you specify repositoryFileId, don’t specify repositoryFileUri.

Optional 32.0
repository​FileUri String URI of the external file, such as https://drive.google.com/file/d/​0B7a_ei8brT1TMy1CQ0o5NmZQNEE/view.

This property can be used with POST requests to /connect/files/users/userId, but not with POST requests to /connect/files/fileId.

If you specifyrepositoryFileUri, don’t specify repositoryFileId.

Optional 39.0
repositoryId String ID of the external data source.

This property can be used with POST requests to /connect/files/users/userId, but not with POST requests to /connect/files/fileId.

Required if repositoryFileId is specified. Otherwise, Optional. 32.0
reuseReference Boolean Specifies whether to reuse the latest version of a reference you own to an external file rather than creating a duplicate reference.

This property can be used with POST requests to /connect/files/users/userId, but not with POST requests to /connect/files/fileId.

Optional 36.0
sharingOption String Sharing option of the file. Values are:
  • Allowed—Resharing of the file is allowed.
  • Restricted—Resharing of the file is restricted.
Optional 35.0
sharingPrivacy String Sharing privacy of a file. Values are:
  • None—File is visible to anyone with record access.
  • PrivateOnRecords—File is private on records.
Optional 41.0
title String Title of the file. Optional 24.0