> For the complete documentation index, see [llms.txt](https://ljtfreitas.gitbook.io/java-restify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ljtfreitas.gitbook.io/java-restify/2.x/tipos-de-conteudo/list/multipart/map.md).

# Map

Uma opção é utilizar um `Map<String, ?>`. Se o valor for do tipo `File`, `Path` ou `InputStream`, ele será serializado como um `MultipartFile`.

A chave do mapa **deve** ser do tipo `String`.

```java
public interface MyApi {

  /* em requisições com o content-type multipart/form-data, mapas com a chave do tipo String serão automaticamente serializados. */

  @Path("/customers/{id}/picture") @Post
  @MultipartFormData
  String uploadPictureToCustomer(@PathParameter id, @BodyParameter Map<String, Object> parameters);
}

MyApi myApi = new RestifyProxyBuilder()
    .target(MyApi.class)
        .build();

Map<String, Object> parameters = new HashMap<>();
parameters.put("picture_name", "main-image");
parameters.put("picture", new File("/path/to/file/picture.jpg"));

Customer customer = myApi.uploadPictureToCustomer("1", parameters);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://ljtfreitas.gitbook.io/java-restify/2.x/tipos-de-conteudo/list/multipart/map.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.
