Press / to search

All documentation
docs Teach the agent Step reference

Runs onWrit CloudDesktopSelf-hosted

Interaction step

Upload file

The upload step attaches a file to the page — either by setting it on an <input type="file"> directly, or by clicking a trigger and intercepting the file chooser. The file itself is a stored asset, never bytes baked into the recipe.

In a workflow, this is a step object with "type": "upload". Steps run in order, and each step can read the outputs of the steps before it. See the full workflows reference for the 30+ step types.

Writ runs on your own accounts, with your own credentials and data, on sites you are authorized to use.

Fields

FieldTypeDescription
selector required selector The file input, or the trigger that opens the chooser.
file_id string Stored-file handle ("file_…") bound to this step (owner runs).
file_slot string Named file slot for shared workflows; each user binds the slot to their own file.
mode string "input" (set on the input element) or "chooser" (click the trigger, intercept the chooser).
is_multiple boolean Whether the target input accepts multiple files.

Example

A single upload step as it appears in a workflow's steps array:

{
  "type": "upload",
  "config": { "selector": "input[type='file']", "file_slot": "invoice", "mode": "input" }
}

How it behaves

  • Shared workflows carry a file slot, not a file: each user binds their own stored file to the slot.
  • A file captured earlier by wait_for_download can be reused here via its {{file:slot}} reference.

Where it runs

The upload step executes wherever the run executes. On your local or BYO agent there is no compute charge and the agent can reach intranet-only systems; on Writ cloud the run is metered by running time (~$0.12 per browser-hour, from your plan’s included usage wallet.

What next

  • Workflows - the full step vocabulary and the workflow object.
  • Recorder - capture steps by clicking through a site.
  • Managed endpoints - turn the workflow into a REST endpoint, or an MCP tool.