> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# upload

> Reference for the `upload` schema.

## Referenced In

* [test](/reference/schemas/test)
* [Resolved context](/reference/schemas/resolved-context)

## Fields

| Field  | Type                                                                        | Description                                                                                                              | Default |
| :----- | :-------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------- | :------ |
| upload | object([Upload files (detailed)](/reference/schemas/upload-files-detailed)) | Required. Set the files of a file input, without opening the file dialog. The files replace any the input already holds. | —       |

## Examples

```json
{
  "upload": {
    "selector": "#avatar",
    "path": "avatar.png"
  }
}
```

```json
{
  "upload": {
    "elementText": "Choose files",
    "path": [
      "a.pdf",
      "b.pdf"
    ]
  }
}
```

```json
{
  "upload": {
    "elementTestId": "resume",
    "path": "files/resume.pdf",
    "timeout": 10000
  }
}
```