# Filename

## Specification

### extension

* Type: `String or Array`.
* Allowed extension or array of allowed extensions.

### nested

Available types:

<table><thead><tr><th width="109" valign="top">Type</th><th valign="top">Specification</th></tr></thead><tbody><tr><td valign="top"><strong>array</strong></td><td valign="top">Provides an array of nested parameters that are shown when the value of the parameter is set (value is not empty).</td></tr><tr><td valign="top"><strong>string</strong></td><td valign="top">Provides the URL address of an RPC to load the list of nested parameters.</td></tr><tr><td valign="top"><strong>object</strong></td><td valign="top">Provides a detailed specification of nested parameters.</td></tr></tbody></table>

{% tabs %}
{% tab title="Use of nested fields" %}

```json
{
    "name": "myFilename",
    "type": "filename",
    "label": "My Filename",
    "nested": "rpc://getNestedFields"
}
```

{% endtab %}
{% endtabs %}

## Examples

### File input

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

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

<div align="left"><figure><img src="/files/JdlBIjAwCbfuVVMaqNUy" 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 %}

### Allowed file extensions

Restrict allowed extensions by adding `extension` option.

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

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

{% tab title="Source" %}

```json
[
	{
		"name": "fileName",
		"type": "filename",
		"label": "File name",
		"semantic": "file:name",
		"extension": ["jpg", "bmp", "png"],
		"help": "Only files with the following extensions are allowed: `jpg`, `bmp`, `png`."
	},
	{
		"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/filename.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.
