# Buffer

## Specification

### codepage

* Type: `String`
* The semantic of the buffer

{% hint style="info" %}
In combination with type `filename` the buffer can be used for better file input dialog.

```json
[
  {
    "name": "fileName",
    "type": "filename",
    "label": "File name",
    "semantic": "file:name"
  },
  {
    "name": "data",
    "type": "buffer",
    "label": "Data",
    "semantic": "file:data"
  }
]
```

{% endhint %}

## Examples

### Basic buffer

A simple binary buffer field. You can use the `toBinary()` function to convert data to a binary format.

{% tabs %}
{% tab title="Appearance" %}

<div align="left"><figure><img src="/files/vdUU6gXuyUUPaFeIkPmU" alt="" width="548"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Source" %}

```json
[
	{
		"name": "data",
		"type": "buffer",
		"label": "Data"
	}
]
```

{% endtab %}

{% tab title="Output" %}

<div align="left"><figure><img src="/files/Lp8bCUDA0ANVIQE16886" alt="" width="350"><figcaption></figcaption></figure></div>
{% endtab %}
{% endtabs %}

### File input

When combined with the `filename` parameter, the buffer can be used for a file input dialog.

{% tabs %}
{% tab title="Appearance" %}

<div align="left"><figure><img src="/files/2uwdPamJOamKzFf0efZH" alt="" width="563"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Source" %}

```json
[
	{
		"name": "fileName",
		"type": "filename",
		"label": "File name",
		"semantic": "file:name"
	},
	{
		"name": "data",
		"type": "buffer",
		"label": "Data",
		"semantic": "file:data"
	}
]
```

{% endtab %}
{% endtabs %}


---

# 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://developers.make.com/custom-apps-documentation/block-elements/parameters/buffer.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.
