What this form is
This file upload form accepts a document plus a short note. It is useful when the upload is the point of the interaction: a document, brief, signed form, resume, intake file, or reference material.
The markup uses multipart encoding because that is how browsers send files. Nothing else in the library needs multipart unless it has a file input.
When to use it
- You need visitors to send one document from a static page.
- You do not want to set up object storage, signed URLs, or upload handlers.
- You want uploads tied to a form submission instead of floating in an inbox with no context.
- You want to keep accepted file types obvious to the visitor.
Fields explained
name and email identify the sender. They use standard autocomplete values because people filling upload forms are often on mobile or in a hurry.
attachment is a file input with a name, a label, and an accept hint for common document formats. The accept attribute guides the picker, but it is not a security boundary. Server-side validation still matters.
message gives the sender a place to explain what they uploaded. Keep it short unless your process needs a full intake questionnaire.
Why it works well with html.contact
html.contact supports file uploads from normal HTML forms, so this template avoids the usual upload paywall problem: no custom upload endpoint, no storage bucket setup, and no extra client script just to receive a document.