Upload intake
An intake workflow runs on an upload between receiving it and saving it. Its steps work on the uploaded content (strip metadata, crop, resize, convert, compress), and a Save file step puts the result in your library. Until that happens, the upload isn't in your library and its links don't serve the unprocessed original.
Use intake when the file you keep should be different from the file you uploaded: screenshots without EXIF data, images scaled down to a sensible size, everything converted to WebP.
How an upload goes through intake
The upload arrives
Tessra receives the file, detects its type from its bytes and works out its size, dimensions and date taken. It then picks the intake workflow for the upload (see Choosing a workflow).
Links are reserved
Tessra reserves the file's id, its links and, if the upload asked for one, its share link, and answers the upload straight away. ShareX gets its links as usual. These links never change, whatever happens next.
The workflow runs
While it runs, the file is pending. It isn't listed in Files, search or folder counts. Its share page shows a processing page that refreshes itself, and its raw link waits up to 20 seconds before answering 503 with a Retry-After header. In the browser, the upload queue shows the file as Processing.
Save file commits it
A Save file step with Save as the upload turned on stores its content as the reserved file. From that moment the links serve the saved content, and the file appears in your library.
If the run ends without saving it, the upload goes to quarantine (or follows the failure policy you chose) and its links answer 404.
Creating an intake workflow
Open Automations, click New workflow and choose Upload intake as the kind. A new intake workflow starts with two steps already connected:
- File received, the trigger.
- Save file, with Content reading the upload and Save as the upload turned on.
As it stands, this saves every upload unchanged, so it's a starting point. Insert steps between the two to change the content. The Compress and resize uploads guide walks through it.
File received filters
| Setting | Effect |
|---|---|
| File types | MIME types such as image/png or image/*. Empty means every file. |
| Largest size (MB) | Larger uploads don't match. Empty means any size. |
| Tokens | Only uploads made with these API tokens, when the workflow is picked automatically. Empty means any upload. |
The trigger provides trigger.content (the received content, with its name, type, size, dimensions, SHA-256 and received date) and trigger.source (where it came from: the web app or the API, and which token).
Choosing a workflow
Each API token has an upload intake setting. Open Settings › API tokens and click Intake on a token:
| Option | Uploads with this token |
|---|---|
| Automatic (default) | Go through the first enabled intake workflow whose trigger accepts them, oldest workflow first. If none does, they're saved as they are. |
| A specific workflow | Always go through that workflow. If it's turned off, deleted or not published, or its trigger doesn't accept the upload, the upload is refused and nothing is stored. |
| No workflow | Are saved as they are, without intake. |
A specific workflow is never silently skipped. When an upload is refused, ShareX shows the error: intake_unavailable (the workflow can't run) or intake_rejected (its trigger filters don't accept the file).
Wait for processing (0 to 60 seconds) makes uploads with this token wait for the workflow to save the file before answering. With 0, the default, the upload answers at once and the links start working when the file is saved. ShareX users may like a few seconds here, so the link they paste already works.
Uploads from the web app always use Automatic, with no wait.
Save file and the upload
Save as the upload is what makes an intake workflow work. A Save file step with it turned on commits its content as the upload's reserved file. Without it, Save file creates a separate, new file.
- Every path through the workflow must save the upload once. Validation reports
primary_save_missingwhen no step saves it, andprimary_save_conflictwhen two could both run in one run. Two Save file steps that save the upload are fine on different branches of the same Condition or Switch. - A saved upload keeps the folder it was uploaded to and its reserved share link, unless the step sets a folder or makes its own link.
- You can add more Save file steps without Save as the upload to keep extra copies, such as the untouched original in an Originals folder.
Steps that change the file
Steps that change a library file (Rename, Add tags, Move to folder, Create share link) act on the run's file by default. In an intake run, that file doesn't exist until the upload is saved, so those steps must come after the Save file step that saves the upload. Validation reports target_pending otherwise.
Usually you don't need them: Save file has its own Name, Folder, Subfolders, Tags, Tag names and Create a share link settings.
Limits
- An intake run has 1 hour from upload to finish. A run still going after that fails.
- A run can make at most 10 working files, together at most 4 times the upload's size (with a floor of 64 MiB).
- Received uploads, working files and quarantine share a staging area (10 GiB on the server, 2 GiB per user by default). When it's full, uploads are refused with
507 storage_full. When your quarantine is full (1 GiB), uploads to workflows that quarantine failures are refused with507 quarantine_full. - Intake runs are worked on before library runs, but library runs always get at least a quarter of the turns.
Administrators can change these limits in the server configuration; see Limits and errors.