# Multipart/form-data

## Upload a file

A module that uploads a file to the service works with data type `buffer` in mappable parameters and type `multipart/form-data` in communication.

{% tabs %}
{% tab title="Occurrence in a Module" %}

<div align="left"><figure><img src="/files/Zpweu5FO27WQISfwCTZ4" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
The file input dialog is where the user can either choose the module that has a file available or manually map the file's name and data on their own.

This works only if the `buffer` is correctly implemented in [interface](#download-a-file) in preceding modules.
{% endhint %}
{% endtab %}

{% tab title="Mappable Parameters" %}

```json
[
	{
		"name": "file_name",
		"type": "text",
		"label": "Name",
		"required": true,
		"semantic": "file:name"
	},
	{
		"name": "file_data",
		"type": "buffer",
		"label": "Data",
		"required": true,
		"semantic": "file:data"
	}
]
```

{% endtab %}

{% tab title="Communication" %}

```json
{
    "url": "http://example.com",
    "body": {
        "file": {
            "value": "{{parameters.file_data}}",
            "options": {
                "filename": "{{parameters.file_name}}"
            }
        }
    },
    "type": "multipart/form-data",
    "method": "POST"
}
```

{% hint style="info" %}
The type of the request is `multipart/form-data`.
{% endhint %}
{% 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/component-blocks/api/multipart-form-data.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.
