Add an input with type="file" and a name, and add enctype="multipart/form-data" to the form tag. Without that attribute the browser sends only the file's name, not the file.
The receiving side then has to accept and store the file. With a form backend that is done for you. On FormTango, storing uploaded files needs a paid plan.
The form
Three things change compared with an ordinary contact form: the enctype on the form tag, the file input, and nothing else.
<form action="https://formtango.com/f/YOUR_FORM_ID" method="POST" enctype="multipart/form-data">
<label>Email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<label>Attachment <input type="file" name="attachment" accept=".pdf,.jpg,.png"></label>
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>
Useful attributes on the file input
- accept limits what the file picker offers, for example accept=".pdf,.docx" or accept="image/*". It is a hint, not a security check.
- multiple lets the visitor pick more than one file in the same input.
- required makes the browser insist on a file before sending.
- HTML has no attribute for a maximum file size. Say the limit in the label, and check it with a few lines of JavaScript if you want to warn people early.
Sending it with fetch
Pass the form element to FormData and use that as the body. Do not set a Content-Type header. The browser writes it, including the boundary marker that separates the parts of the request.
await fetch(form.action, { method: 'POST', headers: { Accept: 'application/json' }, body: new FormData(form) });
The encoding is explained in the glossary under multipart/form-data.
Limits on FormTango
- Up to 5 files and 4 MB in total per submission. A larger request is refused with a 413 error.
- Images, PDF, Office documents, text, CSV, ZIP, audio and video are accepted. Programs and scripts are not.
- Files are stored on paid plans. Pro includes 1 GB of storage.
- On the free plan the submission is still accepted, and the owner is told that an attachment was not kept.
Common mistakes
- Leaving out enctype, so only the file name arrives.
- Using method GET. Files cannot travel in an address.
- Forgetting the name on the file input.
- Not telling visitors the size limit, so phone photos fail without explanation.
Ready-made versions
The HTML file upload form guide has a form to copy, and there are templates for a file upload form and a job application with a resume upload. If uploads fail, see File uploads are not working.
Common questions
- Why is my form only sending the file name?
- The form tag is missing enctype="multipart/form-data". Without it the browser sends the file's name as plain text and leaves the file behind.
- Can I limit file size in HTML?
- No. The accept attribute filters by type only. Check the size in JavaScript using the file's size property, and rely on the receiving side to enforce the real limit.
- Are file uploads free on FormTango?
- No. Uploaded files are stored on paid plans, from $9 a month. On the free plan the rest of the submission is saved without the files.
Written by the FormTango team. Facts about other services were read from their own pages on November 22, 2026. Spotted something out of date? Tell us and we will fix it.