---
url: /process-functions/datasource-binaryload.md
description: Returns a file's contents as a base64 string.
---

# datasource.binaryLoad&#x20;

Returns a file's contents as a base64 string.

::: warning Deprecated
Use [`datasource.readFile(fileName, "base64")`](/process-functions/datasource-readFile) instead.
:::

```js
datasource.binaryLoad(fileName)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `fileName` | `string` | The path of the file. |

## Returns

The file's contents, base64-encoded, or `null` when the file can't be read.

## Examples

```js
const base64 = datasource.binaryLoad("path/to/my_file.bin");
```
