> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/build/work-with-data/transform-data/expression-reference/binaryfile.md).

# Binaryfile

## `binaryFile`.**`directory`** <a href="#binaryfiledirectory" id="binaryfiledirectory"></a>

**Description:** The path to the directory that the file is stored in. Useful for distinguishing between files with the same name in different directories. Not set if n8n is configured to store files in its database.

**Syntax:** `binaryFile`.**`directory`**

**Returns:** String

**Source:** Custom n8n functionality

## `binaryFile`.**`fileExtension`** <a href="#binaryfilefileextension" id="binaryfilefileextension"></a>

**Description:** The suffix attached to the filename (e.g. `txt`)

**Syntax:** `binaryFile`.**`fileExtension`**

**Returns:** String

**Source:** Custom n8n functionality

## `binaryFile`.**`fileName`** <a href="#binaryfilefilename" id="binaryfilefilename"></a>

**Description:** The name of the file, including extension

**Syntax:** `binaryFile`.**`fileName`**

**Returns:** String

**Source:** Custom n8n functionality

## `binaryFile`.**`fileSize`** <a href="#binaryfilefilesize" id="binaryfilefilesize"></a>

**Description:** A string representing the size of the file

**Syntax:** `binaryFile`.**`fileSize`**

**Returns:** String

**Source:** Custom n8n functionality

## `binaryFile`.**`fileType`** <a href="#binaryfilefiletype" id="binaryfilefiletype"></a>

**Description:** A string representing the type of the file, e.g. `image`. Corresponds to the first part of the MIME type.

**Syntax:** `binaryFile`.**`fileType`**

**Returns:** String

**Source:** Custom n8n functionality

## `binaryFile`.**`id`** <a href="#binaryfileid" id="binaryfileid"></a>

**Description:** The unique ID of the file. Used to identify the file when it is stored on disk or in a storage service such as S3.

**Syntax:** `binaryFile`.**`id`**

**Returns:** String

**Source:** Custom n8n functionality

## `binaryFile`.**`mimeType`** <a href="#binaryfilemimetype" id="binaryfilemimetype"></a>

**Description:** A string representing the format of the file’s contents, e.g. `image/jpeg`

**Syntax:** `binaryFile`.**`mimeType`**

**Returns:** String

**Source:** Custom n8n functionality


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/build/work-with-data/transform-data/expression-reference/binaryfile.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
