# Save File

Saves a file from an element or URL

#### Content type

* Element
  * Saves the source of an element (`<img>`, `<video>`, or `<audio>`)
* URL
  * Saves the media at the URL

#### Content

* If content type is Element
  * [Selector](/guides/selectors.md) for the element whose source to save
* If content type is URL
  * URL of the media to save

#### File name

* Name to save the file as

#### File destination

* Where to save the file

#### Store downloaded file path/URL in variable

* Name of the variable to store the path/URL of the downloaded file
* Storing the local file path is only needed if the downloaded file will later be uploaded in the flow since [Upload File](/reference/browserflow-commands/interact-with-page/upload-file.md) requires an absolute path


---

# 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/extract-data/save-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.
