Newer Version Available
File Information
Get information about a specified file, including
references to external files. Upload a new version of an existing file, including references to
external files. Rename a file, move a file to a different folder, and delete a
file.
To upload a new version of an existing file, make a POST request. Upload the new version as a binary part in a multipart/form-data request. See Uploading Binary Files. To upload a new file to the Files home, use /connect/files/users/me.
- Resource
-
1/connect/files/fileId1/connect/communities/communityId/files/fileId - Available since version
- 36.0
- In versions 24.0–35.0, use /chatter/files/fileId and /connect/communities/communityId/chatter/files/fileId, which require Chatter.
- HTTP methods
- GET, POST, PATCH, and DELETE
- Request body for POST
-
- Root XML tag
- <fileInput>
- JSON
-
1{ 2 "desc" : "Employee Survey Results", 3 "title" : "emp_surv_results" 4} - Properties
-
- Request parameters for POST
-
Name Type Description Available Version desc String Description of the file to be uploaded. 26.0 isDataSync Boolean Indicates whether an automated client generates the request. 31.0 isInMyFileSync Boolean true if the file is synced with Salesforce Files Sync; false otherwise. 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. 31.0 sharingOption String Sharing option of the file. Values are: - Allowed—Resharing of the file is allowed.
- Restricted—Resharing of the file is restricted.
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.
41.0 title String Title of the file. 26.0 - Request parameters for GET
-
Get information about the specified file.
Name Type Description Available Version versionNumber Integer Specify an existing version number for the file. If not specified, the latest version is returned. 23.0 - Request parameters for PATCH
-
Update the title of a file or move a file to a different folder.
Name Type Description Available Version desc String A new description for the file 32.0 title String A new title for the file 26.0 isInMyFileSync Boolean true if the file is synced with Salesforce Files Sync; false otherwise. 31.0 parentFolderId String ID of the containing folder 31.0 sharingOption String Sharing option of the file. Values are: - Allowed—Resharing of the file is allowed.
- Restricted—Resharing of the file is restricted.
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.
41.0 - Response body for GET, POST, and PATCH
- File Detail
- Response body for DELETE
- Returns a status code of 204.
- Example
- This PATCH request updates the title of a
file:
1/connect/files/069D00000001FHF?title=A+New+Title