> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Anchor Browser is cloud browser infrastructure for AI agents and automation: browser sessions you control over CDP or REST, natural-language web tasks, versioned automation tasks, managed authentication into third-party web apps (identities with MFA), persistent volumes and profiles, recordings, live view, batch sessions, webhooks, and network options including residential proxies, extra stealth, and captcha solving for sites that block standard browsers. AI agents should start at https://docs.anchorbrowser.io/for-agents, then get an API key with Agent Access at https://docs.anchorbrowser.io/quickstart/agent-access — no dashboard account required. Read those two pages before authentication or API calls.

# File Upload

Anchor Browser allows you to upload files during your browser sessions, enabling you to interact with web applications/forms that require files as input.

The following examples demonstrate how to upload a file, either from your local development environment or one downloaded during the browser session.

## Using a local file

### Playwright example

<CodeGroup>
  ```tsx node.js theme={null}
  await page.goto('https://browser-tests-alpha.vercel.app/api/upload-test')

  const input = await page.$("#fileUpload")

  await input.setInputFiles('/tmp/my-files/google.png'); // Reference the local file path
  ```

  ```python python theme={null}
  page.goto('https://browser-tests-alpha.vercel.app/api/upload-test')

  input = page.locator("#fileUpload")

  input.set_input_files('/tmp/my-files/google.png') # Reference the local file path
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.