---
schema_version: "1"
id: ca38b1899efa6b257767ebb5c521f10eb0dbbb152d8561c658cc98193ac52788
title: ConnectApi.File
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_output_file.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_file.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: ab610051f9b4e5beeba3a63ad6b9fce9683a41a3fd02de645934471813a6dd23
description: File.
---
# ConnectApi.File

File.

This class is abstract.

Subclass of [ConnectApi.ActorWithId](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_actorWithIdOutput.htm "Actor with ID.").

Superclass of [ConnectApi.FileSummary](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_file_sum.htm "A file summary.").

<table class="featureTable sort_table" summary="">




          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d1001021e70">Name</th>

              <th class="featureTableHeader vertical-align-top " id="d1001021e73">Type</th>

              <th class="featureTableHeader vertical-align-top " id="d1001021e76">Description </th>

              <th class="featureTableHeader vertical-align-top " id="d1001021e79">Available Version</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">checksum</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">MD5 checksum for the file.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">content​ModifiedDate</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">Datetime</td>

              <td class="entry" headers="d1001021e76" data-title="Description">ISO 8601 format date string, for example, 2011-02-25T18:24:31.000Z.
                File-specific modified date, which is updated only for direct file operations, such
                as rename. Modifications to the file from outside of Salesforce can update this
                date.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">32.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">contentSize</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">Integer</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Size of the file in bytes.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">contentUrl</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">If the file is a link, returns the URL, otherwise, the string <samp class="codeph apex_code"><span class="keyword">null</span></samp>.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">createdDate</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">Datetime</td>

              <td class="entry" headers="d1001021e76" data-title="Description"><span class="ph" id="createdDate"><a name="createdDate"><!-- --></a>ISO 8601 date string when the file was
                  created.</span></td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">41.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">description</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Description of the file.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">downloadUrl</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">URL to the file, that can be used for downloading the file.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">fileExtension</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Extension of the file.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">fileType</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Type of file, such as PDF, PowerPoint.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">flashRendition​Status</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Specifies if a flash preview version of the file has been rendered. Flash
                renditions were retired on July 16, 2021.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">isFileAsset</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">Boolean</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Specifies whether the file is an asset.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">46.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">isInMyFileSync</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">Boolean</td>

              <td class="entry" headers="d1001021e76" data-title="Description">
                <samp class="codeph nolang">true</samp> if the file is synced with Salesforce
                Files Sync; <samp class="codeph nolang">false</samp> otherwise.
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph nolang">isMajorVersion</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">Boolean</td>

              <td class="entry" headers="d1001021e76" data-title="Description">
                <samp class="codeph nolang">true</samp> if the file is a major version; <samp class="codeph nolang">false</samp> if the file is a minor version. Major versions can’t be replaced.
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">31.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">mimeType</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">File’s MIME type.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">moderationFlags</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type"><samp class="codeph apex_code"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_moderationFlags.htm" title="Information about the moderation flags on a feed item, comment, or file.">ConnectApi.​ModerationFlags</a></samp></td>

              <td class="entry" headers="d1001021e76" data-title="Description">Information about the moderation flags on a file. If <samp class="codeph apex_code">ConnectApi.Features.communityModeration</samp> is <samp class="codeph apex_code"><span class="keyword">false</span></samp>, this property is <samp class="codeph apex_code"><span class="keyword">null</span></samp>.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">30.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">modifiedDate</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">Datetime</td>

              <td class="entry" headers="d1001021e76" data-title="Description">ISO 8601 format date string, for example, 2011-02-25T18:24:31.000Z.
                Modifications to the file from within Salesforce update this date.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">name</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Name of the file.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">origin</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Specifies the file source. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph apex_code">Chatter</samp>—file came from
                    Chatter
                  </li>

                  <li class="li">
                    <samp class="codeph apex_code">Content</samp>—file came from
                    content
                  </li>

                </ul>
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">owner</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type"><samp class="codeph apex_code"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_user_summary.htm" title="User summary.">ConnectApi.​User​Summary</a></samp></td>

              <td class="entry" headers="d1001021e76" data-title="Description">File’s owner.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">pdfRendition​Status</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Specifies if a PDF preview version of the file has been rendered.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">publishStatus</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type"><samp class="codeph apex_code">ConnectApi.​FilePublishStatus</samp></td>

              <td class="entry" headers="d1001021e76" data-title="Description">Specifies the publish status of the file.<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">PendingAccess</samp>—File is pending publishing.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">PrivateAccess</samp>—File is private.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">PublicAccess</samp>—File is public.
                  </li>
                </ul>
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">renditionUrl</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">URL to the rendition for the file.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">renditionUrl​240By180</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">URL to the 240 x 180 rendition resource for the file.
                For shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">29.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">renditionUrl​720By480</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">URL to the 720 x 480 rendition resource for the file.
                For shared files, renditions process asynchronously after upload. For private files, renditions process when the first file preview is requested, and aren’t available immediately after the file is uploaded.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">29.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">sharingOption</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/connectAPI_enums.htm#FileSharingOption_enum"><samp class="codeph apex_code">ConnectApi.​FileSharingOption</samp></a></td>

              <td class="entry" headers="d1001021e76" data-title="Description">Sharing option of the file. Values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph apex_code">Allowed</samp>—Resharing of the file is allowed.
                  </li>
                  <li class="li">
                    <samp class="codeph apex_code">Restricted</samp>—Resharing of the file is restricted.
                  </li>
                </ul>
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">35.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">sharingPrivacy</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/connectAPI_enums.htm#FileSharingPrivacyEnum"><samp class="codeph apex_code">ConnectApi.​FileSharingPrivacy</samp></a></td>

              <td class="entry" headers="d1001021e76" data-title="Description">Sharing privacy of a file.
                Values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph apex_code">None</samp>—File is visible to anyone with record access.
                  </li>
                  <li class="li">
                    <samp class="codeph apex_code">PrivateOnRecords</samp>—File is private on records.
                  </li>
                </ul>
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">41.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">sharingRole</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type"><samp class="codeph apex_code">ConnectApi.​FileSharingType</samp></td>

              <td class="entry" headers="d1001021e76" data-title="Description">Sharing role of the file.<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Admin</samp>—Owner permission, but doesn’t own the file.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Collaborator</samp>—Viewer permission, and can edit, change permissions, and upload a new version of a file.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Owner</samp>—Collaborator permission, and can make a file private, and delete a file.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Viewer</samp>—Can view, download, and share a file.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">WorkspaceManaged</samp>—Permission controlled by the library.
                  </li>
                </ul>
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">systemModstamp</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">Datetime</td>

              <td class="entry" headers="d1001021e76" data-title="Description"><span class="ph" id="systemModstamp"><a name="systemModstamp"><!-- --></a>ISO 8601 date string indicating when a user or any
                  automated system process, such as a trigger, updated the file.</span></td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">41.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">textPreview</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Text preview of the file if available; <samp class="codeph nolang">null</samp> otherwise.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">30.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">thumb120By90​RenditionStatus</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Specifies the rendering status of the 120 x 90 preview image of the file. One of these values:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Processing</samp>—Image is being rendered.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Failed</samp>—Rendering process failed.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Success</samp>—Rendering process was successful.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Na</samp>—Rendering is not available for this image.
                  </li>
                </ul>
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">thumb240By180​RenditionStatus</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Specifies the rendering status of the 240 x 180 preview image of the file. One of these values:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Processing</samp>—Image is being rendered.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Failed</samp>—Rendering process failed.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Success</samp>—Rendering process was successful.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Na</samp>—Rendering is not available for this image.
                  </li>
                </ul>
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">thumb720By480​RenditionStatus</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Specifies the rendering status of the 720 x 480 preview image of the file. One of these values:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Processing</samp>—Image is being rendered.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Failed</samp>—Rendering process failed.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Success</samp>—Rendering process was successful.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Na</samp>—Rendering is not available for this image.
                  </li>
                </ul>
              </td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">title</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">Title of the file.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d1001021e70" data-title="Name"><samp class="codeph apex_code">versionNumber</samp></td>

              <td class="entry" headers="d1001021e73" data-title="Type">String</td>

              <td class="entry" headers="d1001021e76" data-title="Description">File’s version number.</td>

              <td class="entry" headers="d1001021e79" data-title="Available Version">28.0</td>

            </tr>

          </tbody>

        </table>