Newer Version Available

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

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. You must 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 tab, use /chatter/users/me/files.

Resource
1/chatter/files/fileId
1/connect/communities/communityId/chatter/files/fileId
Available since version
24.0
Requires Chatter
Yes
HTTP methods
GET, POST, PATCH, DELETE, or HEAD

POST, PATCH, and DELETE available since version 26.0.

Note

Request body for POST

Uploads to SharePoint 2010 are limited to 3 MB.

Root XML tag
<fileInput>
JSON
1{
2     "desc" : "Employee Survey Results",
3     "title" : "emp_surv_results"
4}
Properties
Name Type Description Required or Optional Available Version
content​ModifiedDate Date File-specific last modified date that can be used to set a client-side modified date. Optional 32.0
desc String Description of the file to be uploaded. Optional 24.0
isInMyFileSync Boolean true if the file is synced withSalesforce Files Sync; false otherwise. 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. Optional 32.0
repositoryId String ID of the external data source. Optional 32.0
title String Title of the file. Optional 24.0
Request parameters for POST

Uploads to SharePoint 2010 are limited to 3 MB.

Name Type Description Available Version
desc String Description of the file to be uploaded. 26.0
isDataSync Boolean The request is automatically generated by an automated client. 31.0
isInMyFileSync Boolean true if the file is synced withSalesforce 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
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 or sync state 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 withSalesforce Files Sync; false otherwise. 31.0
parentFolderId String ID of the containing folder 31.0
Response body for GET, POST, PATCH, and HEAD
File Detail
Response body for DELETE
Returns a status code of 204.
Example
This PATCH request updates the title of a file:
1/chatter/files/069D00000001FHF?title=A+New+Title