Newer Version Available

This content describes an older version of this product. View Latest

Files Connect Repository File Preview

Get a repository file preview or a specific page in a preview.

File previews are supported only for Google Drive.

Resource
1/connect/content-hub/repositories/repositoryId/files/repositoryFileId/previews/formatType
1/connect/communities/communityId/content-hub/repositories/repositoryId/files/repositoryFileId/previews/formatType
Supported values for previewFormat:
  • jpg—Preview format is JPG.

    If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

  • pdf—Preview format is PDF.

    PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. If you need a PDF preview for files of type PDF, call the download version using the File Content resource.

  • svg—Preview format is SVG.

    SVG files are generated on demand. Alternatively, you can generate an SVG preview by making a PATCH request to /connect/files/fileId/previews.

    Hyperforce doesn’t support the SVG file preview format. Any org hosted on Hyperforce defaults to JPG file preview format regardless of the org preference in Setup.

    Note

  • thumbnail—Preview format is 240 x 180 PNG.
  • big-thumbnail—Preview format is 720 x 480 PNG.
  • tiny-thumbnail—Preview format is 120 x 90 PNG.
Available version
36.0
Requires Chatter
No
HTTP methods
GET, HEAD
Request parameters for GET
Parameter Name Type Description Required or Optional Available Version
endPageNumber Integer The ending page number in the range of file preview URLs. Optional 36.0
startPageNumber Integer The starting page number in the range of file preview URLs. Optional 36.0
Response body for GET
File Preview