---
title: "Discussion on \"File uploads in OpenAPI: multipart/form-data, raw binary, and multiple files done right\" | Hashnode"
description: "Discussion on \"File uploads in OpenAPI: multipart/form-data, raw binary, and multiple files done right\". Most OpenAPI upload specs are subtly wrong: the file is typed as a string, the multipart boundary is undocumented, or an array of files generates the wrong client. Here is how to model each of the three real upload shapes so codegen, mocks, and scanners all agree."
url: "https://hashnode.com/posts/openapi-file-upload-multipart-form-data-guide/6aca07a490d4a870c03ae809"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [File uploads in OpenAPI: multipart/form-data, raw binary, and multiple files done right](https://blogs.powerduck.com/openapi-file-upload-multipart-form-data-guide?utm_source=hashnode&utm_medium=feed)

Most OpenAPI upload specs are subtly wrong: the file is typed as a string, the multipart boundary is undocumented, or an array of files generates the wrong client. Here is how to model each of the three real upload shapes so codegen, mocks, and scanners all agree.

Oct 7 · 6 min read · blogs.powerduck.com  
Read the article

-   [#openapi](https://hashnode.com/tag/openapi)
-   [#api-design](https://hashnode.com/tag/api-design)
-   [#file-upload](https://hashnode.com/tag/file-upload)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Powerduck](https://hashnode.com/@powerduck)

@powerduck · hon

  
[View profile](https://hashnode.com/@powerduck)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
