> For the complete documentation index, see [llms.txt](https://docs.fylr.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fylr.io/for-administrators/readme/file-worker.md).

# File Worker

The file worker manages every file uploaded to fylr: it stores the original and generates the preview versions (renditions) from it.

The **file worker** takes care of every file that is uploaded to fylr. It has two jobs:

* **Store the file** — the uploaded **original** is kept in a storage location and can always be downloaded again unchanged.
* **Generate versions** — from the original the file worker produces a set of **versions** (also called *renditions*): smaller preview images, thumbnails, a web-friendly video, a PDF of an office document, and so on. Versions are what the frontend shows in search results and detail views, and what most users download.

<figure><img src="https://4100607288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAdRFzQASDY2Elfdm3wXW%2Fuploads%2Fgit-blob-9d2a2b3cc7317d32ec2c155c439e2108a46a5423%2Ffile-worker-section.png?alt=media" alt="The File Worker section of the base configuration"><figcaption></figcaption></figure>

## File classes

Every uploadable file type belongs to one of five **file classes**. The file worker handles each class with its own tools and its own set of versions:

| CLASS      | EXAMPLES                                                                        |
| ---------- | ------------------------------------------------------------------------------- |
| **Image**  | jpg, png, tiff, gif, heic, camera raw (cr2, nef, dng, …), svg, ai, eps, ps, psd |
| **Audio**  | mp3, wav, flac, m4a, aac, ogg                                                   |
| **Video**  | mp4, mov, avi, mkv, webm, mpeg                                                  |
| **Office** | pdf, doc(x), xls(x), ppt(x), odt, rtf, txt, indd, fonts (ttf, otf)              |
| **3D**     | splat, ksplat, spz, ply, stl, obj, 3ds, glb, gltf, nxs, nxz (from 6.35.0)       |

For each class you decide which file extensions may be uploaded at all, and which versions are generated for them. See [Preview Configuration](/for-administrators/readme/file-worker/preview-configuration.md).

## Versions and recipes

A **version** is one rendition of an original — for example a 250 px thumbnail or a 1000 px preview. Each version is produced by a **recipe**: a named conversion routine (for example `imageconverter:browserthumbs` resizes an image, `officeconverter:pdf` turns a document into a PDF). The recipe's **options** — output format, size, quality and so on — are what turn the original into that specific version. The recipes and their options are documented on the [Preview Configuration](/for-administrators/readme/file-worker/preview-configuration.md) page.

Some versions are **derived from another version** instead of from the original: the watermarked preview is built from the `preview` version, and previews of wmf files are built from a generated `svg`. This *source version* chaining means that re-generating a source version also re-generates everything built on top of it.

Up to version 6.34 the previews of ai and eps files were built from that `svg` as well. From version 6.35.0 they are rendered from the original instead, and the `svg` version is only produced for a drawing simple enough to make a usable one. A file handling configuration saved before 6.35.0 still carries the old wiring; the update rewrites it, and the configuration then shows ai and eps sourced from the original.

PostScript files (ps) are accepted from version 6.35.0. Their previews are rendered like eps, from the first page, and as a document they also get a `pdf` version of every page and the `pages` version for the paged viewer, like a PDF upload. A file handling configuration saved before that does not list the extension: enable ps in the image class and add it to the ai/eps versions, or reset the class to the default.

The same holds for everything else 6.35.0 adds to the default: a configuration saved before keeps its classes and versions, so it has no `3d` class and no `pages` version for videos and multi-page TIFFs. The file worker names, per class, what the class lacks against the default, and **Add missing** adds it; **Reset to default** replaces the whole class.

A .ps file can also be a PostScript Type 1 font program, the form FontForge and the Adobe tools write a font in. Such a file defines a font and draws no page, so its versions show a specimen of the font instead: the sample text drawn by the font (the `font_text` option of the recipes, the same lines as the ttf/otf specimen by default), or the font's own glyphs when it does not cover that text, as with an icon font. The `pdf` and `pages` versions are that one specimen page. The metadata carries the font's names and glyph count, as for ttf and otf.

### Standard, rights-management and watermark versions

* A **standard** version (such as `preview` and `small`) is the one shown by default — in search results, in the detail view and so on.
* A version marked for **rights management** can be restricted per pool or object type in the [permissions](/for-administrators/permissions.md); versions without it are always accessible to everyone who may see the record.
* A **watermark** version carries the pool watermark and is used together with rights management to hand out watermarked previews.

## Storage

The file worker keeps three kinds of data, each in its own [storage location](/for-administrators/readme/file-worker/location-defaults.md):

* **Originals** — the untouched uploaded files.
* **Versions** — the generated renditions.
* **Backups** — backup copies.

## When versions are generated

Versions are generated **when a file is uploaded**. Changing the version configuration therefore only affects files uploaded afterwards — existing files keep their current versions until you re-generate them with a resync. See [Regenerating preview images](/help/tutorials/for-system-administrators/regenerating-preview-images.md), and [Changing the preview format](/help/tutorials/for-system-administrators/regenerating-preview-images.md#changing-the-preview-format) for the special case of switching a version's file format.

## In this section

* [**Preview Configuration**](/for-administrators/readme/file-worker/preview-configuration.md) — which versions are generated for each file class, and the recipes and options behind them.
* [**Location Defaults**](/for-administrators/readme/file-worker/location-defaults.md) — the default storage locations for originals, versions and backups.
* [**Custom .icc Color Profiles**](/for-administrators/readme/file-worker/custom-.icc-color-profiles.md) — add your own ICC color profiles for image conversion.
* [**Custom Version Presets**](/for-administrators/readme/file-worker/custom-version-presets.md) — on-demand rendition presets offered to users in the download dialog.
