Preview

previewPublicFile

Changed on

Generate a thumbnail preview for a public file entity.

No authentication required. This endpoint only works for files with access_control: public-read.

SVG files are rasterized to PNG by default. With keep_original=true, SVG files redirect to the selected version's original S3 object, preserving vector rendering. Width and height parameters are ignored only for SVG files when this option is enabled. This option only applies to SVG files; previews of other file formats are unchanged.

get/v1/files/public/{id}/preview

Request

  • Base URL
    https://file.sls.epilot.io
  • URL
    https://file.sls.epilot.io/v1/files/public/{id}/preview
  • Auth
    none required

Path parameters

string required

Empty string (used when file ID not yet assigned)

OR
string uuid required

Valid UUID v4

The UUID of the public file entity

Query parameters

versioninteger

Index of the file version to preview (0 = latest)

winteger

Desired width in pixels

hinteger

Desired height in pixels

keep_originalboolean

Applies only to SVG files. When true, redirects SVG files to the selected version's original S3 object instead of rasterizing to PNG and ignores width/height parameters. Preview behavior for all other file formats is unchanged.

org_idstring

Organization ID that owns the file

Response

Generated thumbnail image for a public file

Changes