# Upload File

Upload file to a `<input type="file">` element

#### Selector

* [Selector](/guides/selectors.md) for the `<input type="file">` element

#### File path

* Absolute path to the file
  * Example
    * macOS: `/Users/dkthehuman/Downloads/profile.png`
    * Windows: `C:\Documents\Newsletters\Summer2018.pdf`
  * If uploading a file that was downloaded earlier in the flow from a [Click](/reference/browserflow-commands/interact-with-page/click.md) or [Save File](/reference/browserflow-commands/extract-data/save-file.md) command, pass in the variable set from the "Store downloaded file path in variable" field

### Requirements

In order to use this command, you need to allow Browserflow to access files:

1. Open chrome://extensions/
2. Click "Details" for Browserflow
3. Enable "Allow access to file URLs"

### Limitations

Browserflow does not yet support uploading files into `<input>` elements inside iframes

### Finding the file upload element

On many sites, the file upload element is hidden, which means that it's not possible to select it using the "Select" button. In these cases, you can use Recording Mode to have Browserflow detect the correct file upload element.

1. [Start recording](/guides/building-a-flow.md#recording-actions)
2. Upload a file as you normally would
3. Stop recording
4. Clean up the recorded actions
   * If you clicked on a button to trigger the file selector, you can remove the `Click` command as it's not needed when using the `Upload File` command
   * Enter the [absolute path](/reference/browserflow-commands/interact-with-page/upload-file.md#file-path) for the file you'd like to upload (Browserflow cannot detect this automatically while recording)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.browserflow.app/reference/browserflow-commands/interact-with-page/upload-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
