ConnectApi.ContentCapabilityInput

Attach or update a file on a comment. Use this class to attach a new file or update a file that has already been uploaded to Salesforce.

This class is a subclass of ConnectApi.FeedElementCapabilityInput.

To attach or remove files from a feed post (instead of a comment) in version 36.0 and later, use ConnectApi.FilesCapabilityInput.

PropertyTypeDescriptionRequired or OptionalAvailable Version
content​DocumentIdStringID of the existing content.Required for existing content32.0
descriptionStringDescription of the file to be uploaded.Optional32.0
sharingOptionConnectApi.​FileSharing​OptionSharing option of the file. Values are:
  • Allowed—Resharing of the file is allowed.
  • Restricted—Resharing of the file is restricted.
Optional35.0
titleStringTitle of the file. This value is used as the file name for new content. For example, if the title is My Title, and the file is a .txt file, the file name is My Title.txt.Required for new content32.0

See Also