ConnectApi.File

File.

This class is abstract.

Subclass of ConnectApi.ActorWithId.

Superclass of ConnectApi.FileSummary.

NameTypeDescriptionAvailable Version
checksumStringMD5 checksum for the file.28.0
content​ModifiedDateDatetimeISO 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.32.0
contentSizeIntegerSize of the file in bytes.28.0
contentUrlStringIf the file is a link, returns the URL, otherwise, the string null.28.0
createdDateDatetimeISO 8601 date string when the file was created.41.0
descriptionStringDescription of the file.28.0
downloadUrlStringURL to the file, that can be used for downloading the file.28.0
fileExtensionStringExtension of the file.28.0
fileTypeStringType of file, such as PDF, PowerPoint.28.0
flashRendition​StatusStringSpecifies if a flash preview version of the file has been rendered. Flash renditions were retired on July 16, 2021.28.0
isFileAssetBooleanSpecifies whether the file is an asset.46.0
isInMyFileSyncBooleantrue if the file is synced with Salesforce Files Sync; false otherwise.28.0
isMajorVersionBooleantrue if the file is a major version; false if the file is a minor version. Major versions can’t be replaced.31.0
mimeTypeStringFile’s MIME type.28.0
moderationFlagsConnectApi.​ModerationFlagsInformation about the moderation flags on a file. If ConnectApi.Features.communityModeration is false, this property is null.30.0
modifiedDateDatetimeISO 8601 format date string, for example, 2011-02-25T18:24:31.000Z. Modifications to the file from within Salesforce update this date.28.0
nameStringName of the file.28.0
originStringSpecifies the file source. Valid values are:
  • Chatter—file came from Chatter
  • Content—file came from content
28.0
ownerConnectApi.​User​SummaryFile’s owner.28.0
pdfRendition​StatusStringSpecifies if a PDF preview version of the file has been rendered.28.0
publishStatusConnectApi.​FilePublishStatusSpecifies the publish status of the file.
  • PendingAccess—File is pending publishing.
  • PrivateAccess—File is private.
  • PublicAccess—File is public.
28.0
renditionUrlStringURL to the rendition for the file.28.0
renditionUrl​240By180StringURL 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.29.0
renditionUrl​720By480StringURL 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.29.0
sharingOptionConnectApi.​FileSharingOptionSharing option of the file. Values are:
  • Allowed—Resharing of the file is allowed.
  • Restricted—Resharing of the file is restricted.
35.0
sharingPrivacyConnectApi.​FileSharingPrivacySharing privacy of a file. Values are:
  • None—File is visible to anyone with record access.
  • PrivateOnRecords—File is private on records.
41.0
sharingRoleConnectApi.​FileSharingTypeSharing role of the file.
  • Admin—Owner permission, but doesn’t own the file.
  • Collaborator—Viewer permission, and can edit, change permissions, and upload a new version of a file.
  • Owner—Collaborator permission, and can make a file private, and delete a file.
  • Viewer—Can view, download, and share a file.
  • WorkspaceManaged—Permission controlled by the library.
28.0
systemModstampDatetimeISO 8601 date string indicating when a user or any automated system process, such as a trigger, updated the file.41.0
textPreviewStringText preview of the file if available; null otherwise.30.0
thumb120By90​RenditionStatusStringSpecifies the rendering status of the 120 x 90 preview image of the file. One of these values:
  • Processing—Image is being rendered.
  • Failed—Rendering process failed.
  • Success—Rendering process was successful.
  • Na—Rendering is not available for this image.
28.0
thumb240By180​RenditionStatusStringSpecifies the rendering status of the 240 x 180 preview image of the file. One of these values:
  • Processing—Image is being rendered.
  • Failed—Rendering process failed.
  • Success—Rendering process was successful.
  • Na—Rendering is not available for this image.
28.0
thumb720By480​RenditionStatusStringSpecifies the rendering status of the 720 x 480 preview image of the file. One of these values:
  • Processing—Image is being rendered.
  • Failed—Rendering process failed.
  • Success—Rendering process was successful.
  • Na—Rendering is not available for this image.
28.0
titleStringTitle of the file.28.0
versionNumberStringFile’s version number.28.0