<!-- BusyBot node reference — https://busybot.net/tools/read-binary-file/ -->

> Node: Read Binary File (`read_binary_file`) · Action (binary) · v1
> Category: Core Nodes · Credentials: none
> Updated: 2026-08-16

# Read Binary File

> Read a single file from disk into binary data (deprecated)

## Overview

The Read Binary File tool reads a single file from the execution files directory by path and attaches its contents to the output item as binary data, alongside the file's metadata. It is a legacy/deprecated tool superseded by the read_write_file tool. All file operations are sandboxed to the execution-scoped directory to prevent directory traversal attacks. Each input item triggers a file read using the evaluated filePath parameter, enabling dynamic path construction from upstream data. The output includes file metadata (mimeType, fileType, fileExtension, fileSize, fileName) in the item JSON and the file contents in the specified binary property.

**Category:** Core Nodes  
**Tool Name:** `read_binary_file`  
**Version:** 1

**Appearance:** Icon: `lucide-FileDown` | Color: `#6b7280`

## Node Type

**Action (Binary)** — handles file/binary data operations

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool does not require any credentials.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| File Path | `string` | Yes | — | Path of the file to read, relative to the execution files directory. Supports expressions for dynamic path construction. |
| Binary Property | `string` | Yes | `data` | Name of the binary property to store the file contents under on the output item. Names are case-sensitive — see the upstream node's Binary Data panel for the exact names to use. |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

One output item per input item. The input item JSON passes through and five metadata fields are added to it:

```json
{
  "mimeType": "application/pdf",
  "fileType": "application",
  "fileName": "invoice.pdf",
  "fileExtension": "pdf",
  "fileSize": "148.20 kB"
}
```

- `mimeType` — detected from the file name and its contents.
- `fileType` — the broad category taken from the MIME type (`image`, `audio`, `video`, `text` or `application`), or `unknown` when it does not match one of those.
- `fileName` — the bare file name including its extension, not the path you asked for.
- `fileExtension` — the extension without the leading dot.
- `fileSize` — a **human-readable string** such as `938 B`, `148.20 kB` or `2.31 MB`, not a number. Do not use it in arithmetic.

The file contents are attached as binary data under the name given by **Binary Property**, merged with any binary the item already carried, so a downstream node can upload or parse the file without touching the disk again.

Reference the metadata downstream by expression, e.g. `{{ $json.fileName }}`.

## Usage Examples

- Read a PDF file from disk
- Load an image file into binary data
- Import a CSV file for further processing
- Read a file with a dynamic path from upstream data

## Example Configuration

Read a fixed file:

```json
{
  "type": "read_binary_file",
  "parameters": {
    "filePath": "uploads/invoice.pdf",
    "binaryPropertyName": "data"
  }
}
```

Read a file whose path comes from the item:

```json
{
  "type": "read_binary_file",
  "parameters": {
    "filePath": "uploads/{{ $json.fileName }}",
    "binaryPropertyName": "attachment",
    "maxConcurrency": 10
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Read a single file from the execution files directory into binary data — deprecated legacy node, use read_write_file instead.

### Behavior notes

- **Prefer Read/Write Files from Disk.** This node is kept for existing workflows; the newer node covers the same job, reads several files at once with a glob, and can write as well as read.
- **Paths are relative and sandboxed.** A path is resolved inside this execution's own files directory; an absolute path or one that climbs out with `..` is rejected. Only files another node in the same run has written are there to read.
- **Missing files fail the item, they are not skipped.** The error names the path, so a typo is easy to spot; use error handling set to `continue` if some paths are expected to be absent.
- **One file per item.** To read a whole directory in one node, use Read Binary Files or Read/Write Files from Disk with a glob pattern.