Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

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.

Property Type Description Required or Optional Available Version
content​DocumentId String ID of the existing content. Required for existing content 32.0
description String Description of the file to be uploaded. Optional 32.0
sharingOption ConnectApi.​FileSharing​Option Sharing option of the file. Values are:
  • Allowed—Resharing of the file is allowed.
  • Restricted—Resharing of the file is restricted.
Optional 35.0
title String Title 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 content 32.0