---
schema_version: "1"
id: 106a05bd9fec0597ed29834e548b4b4f876b5e0ec15cf0d7a517a4b01cfb4403
title: ConnectApi.NewFileAttachmentInput
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_input_NewFileAtt.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_NewFileAtt.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6f02622d710474d6aaa584093d856ef541431ca0ae664ba5a52de12f59f8a08b
description: Attach a new file to a feed item.
---
# ConnectApi.NewFileAttachmentInput

Attach a new file to a feed item.

![Important](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/images/icon_note_important.png)

#### Important

This class isn’t available in version 32.0 and later. In version 32.0 and later, use [ConnectApi.ContentCapabilityInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_content_capability.htm "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.").

The actual binary file, that is the attachment, is provided as part of the [BinaryInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_binary.htm "Create a ConnectApi.BinaryInput object to attach files to feed items and comments, to add repository files, to create managed content, and to replace managed content variants.") in the method that takes this attachment input, such as postFeedItem or postComment.

Subclass of [ConnectApi.FeedItemAttachmentInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_FeedItemAtt.htm "Used to attach a file to a feed item.").

| Property | Type | Description | Available Version |
| --- | --- | --- | --- |
| description | String | Description of the file to be uploaded. | 28.0–31.0 |
| title | String | The title of the file. This value is required and is also used as the file name. For example, if the title is My Title, and the file is a .txt file, the file name is My Title.txt. | 28.0–31.0 |