Multipart/form-data
multipart/form-data is an HTTP media type that encodes form fields and files as independently typed parts within one message.
Django in Action
multipart/form-data is an HTTP media type for encoding form fields and uploaded files as separate parts of one request body.
- How it is used
- Enables Django forms to submit uploaded pictures alongside ordinary venue fields.
- How deep it goes
- Explains template and view wiring for ModelForm uploads without descending into multipart wire-format internals.
- Examples
- Uses a venue add/edit form that uploads a picture with name and description fields.
- What you can do after
- Apply it via Django ModelForm by setting enctype and passing request.FILES alongside request.POST.
Build Financial Software with Generative AI (From Scratch)
Multipart/form-data is a media encoding format that packages one or more form fields or files into separate parts of an HTTP request.
- How it is used
- Handles HTTP file uploads so ACH files can enter an application before parsing and downstream validation.
- How deep it goes
- Explains request parsing, dependency installation, endpoint handling, testing, and persistence, but not multipart boundary internals.
- Examples
- Uses an ACH file, FastAPI upload tests, UploadFile, python-multipart, and an MD5-based file record.
- What you can do after
- Apply it via FastAPI by installing python-multipart, accepting UploadFile, testing multipart requests, and storing upload metadata.
Read how Build Financial Software with Generative AI (From Scratch) explains multipart/form-data →
The Design of Web APIs, Second Edition
multipart/form-data is an HTTP media type that packages multiple independently typed parts, including form fields and binary files, in one message.
- How it is used
- Packages form metadata and binary files into one upload request when consumers or implementations cannot use multiple calls.
- How deep it goes
- Defines boundaries, repeated parts, media types, and OpenAPI encoding, but defers detailed implementation behavior to HTTP libraries.
- Examples
- Uses account applications, applicant names, JSON data, identity documents, residence PDFs, and repeated documents parts.
- What you can do after
- Apply it to design single-call file uploads and document their parts with OpenAPI.
Read how The Design of Web APIs, Second Edition explains multipart/form-data →
Related concepts
- request messageused by · An HTTP request is a message sent by a client to a server that specifies a method and target and may include headers and a body.
- python-multipartuses · python-multipart is a Python package for parsing multipart form-data request bodies.
- MIME typekind of · A standardized media-type identifier, typically written as a type and subtype, that describes the format and general nature of data in a resource or message.
- HTMLconfigures · HTML (HyperText Markup Language) is the standard markup language for structuring content and elements in web documents.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


