# Data and Files

Source: https://zshot-cli.com/reference/navigator/data-and-files/
Markdown: https://zshot-cli.com/reference/navigator/data-and-files/index.md
Section: [Reference](https://zshot-cli.com/reference/) › [Navigator](https://zshot-cli.com/reference/navigator/)

Data is task information the navigator reads and fills by name. Files are what it attaches to upload fields.

## Data

[`--navigator-data`](/reference/flags/navigator/navigator-data) gives one value, and [`--navigator-data-json`](/reference/flags/navigator/navigator-data-json) an object of them. The navigator sees every name and value in every prompt, and picks what the page asks for from it: "35–44" for an age of 37, or "California" for `CA`.

FILL takes a value exactly as given with `data:NAME`, and a form field labelled with the name is filled from it directly. A decision model such as [`typesafe`](/reference/llm_connections/typesafe) is offered each value as a choice, so it can fill a form without a writer. An [`--llm-format-model`](/reference/flags/document/llm-format-model) formatter is given the data too, beside the account of the navigation.

Data is not secret: it reaches the model's provider and appears in reproductions. Use a [credential](/reference/navigator/credentials) for anything the model must not see.

In a JSON object, nested names join with dots: `{"address": {"city": "Leeds"}}` is `address.city`, and an array's items are numbered from 0. Numbers and booleans become text. `null` removes a name an earlier object set. Each object overrides the ones before it, every `--navigator-data` overrides them all, and a later `--navigator-data` overrides an earlier one. The names and values together hold at most 16,000 characters.

A server takes `navigator_data` and `navigator_data_json` from each request, and refuses both flags at startup. Over HTTP, `navigator_data_json` is an array of objects and URLs, sent by POST; the server reads no local file.

## Files

[`--navigator-file`](/reference/flags/navigator/navigator-file) offers a file by name. The navigator sees the name, never the path or the file's contents. When the name matches a field's label the file is attached directly; otherwise the navigator infers which file belongs in which field.

A page that opens the file chooser from its own button, with the input hidden, reaches the navigator with the accepted types, and the navigator attaches a provided file. With no file provided, the chooser is cancelled and the navigator is told the page asked for one.

The first attach records the file's SHA-256. A later attach in the same run that finds different bytes fails with `changed since first use`, exit code 15.

### Size Limit

[`--navigator-file-size-limit`](/reference/flags/navigator/navigator-file-size-limit) applies to every source. A path is measured at startup and again at each attach. A data URL is measured when the request is built, after its own 10 MB cap. A URL whose `Content-Length` exceeds the limit is refused before a byte is read; otherwise the body streams to disk and is discarded once it passes the limit.

### URL Sources

A URL is fetched with a plain `GET` and ZShot's user agent, through the same IP filter as the render, following redirects. The fetch carries no cookies and no page session, so a file behind the page's login belongs on disk or in a data URL. The uploaded file takes the server's `Content-Disposition` name, else the URL's last path segment. A failed fetch exits with code 15.

### Server

`navigator_file` is a name-to-source map of data URLs and `http(s)` URLs; the server reads no local files, and refuses the flag at startup. A data URL is capped at 10 MB and uploads as its name plus an extension for its MIME type. A failed URL fetch answers `502` with the file name and the failure class.

## Related

Flags:

- [`--navigator-data`](https://zshot-cli.com/reference/flags/navigator/navigator-data/)
- [`--navigator-data-json`](https://zshot-cli.com/reference/flags/navigator/navigator-data-json/)
- [`--navigator-file`](https://zshot-cli.com/reference/flags/navigator/navigator-file/)
- [`--navigator-file-size-limit`](https://zshot-cli.com/reference/flags/navigator/navigator-file-size-limit/)
- [`--navigator-file-timeout`](https://zshot-cli.com/reference/flags/navigator/navigator-file-timeout/)

Topics:

- [Upload a file, download the result](https://zshot-cli.com/examples/enhance-leads/)
- [Credentials](https://zshot-cli.com/reference/navigator/credentials/)
- [Exit Codes](https://zshot-cli.com/reference/exit_codes/)

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
  - [Flags](https://zshot-cli.com/reference/flags/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Docker](https://zshot-cli.com/reference/docker/)
  - [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
  - [Linux](https://zshot-cli.com/reference/linux/)
  - [LLM Connections](https://zshot-cli.com/reference/llm_connections/)
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
    - [Actions](https://zshot-cli.com/reference/navigator/actions/)
    - [Navigators](https://zshot-cli.com/reference/navigator/navigators/)
    - [Scope](https://zshot-cli.com/reference/navigator/scope/)
    - [Credentials](https://zshot-cli.com/reference/navigator/credentials/)
    - **Data and Files**
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

