HTML file upload form

A file input only sends the file if the form uses multipart encoding. Miss that one attribute and only the file's name arrives. FormTango stores the uploaded files with the submission, so you need no storage or server code.
  1. 1

    Create a free FormTango account and add a form. Copy its endpoint, which looks like https://formtango.com/f/YOUR_FORM_ID.

  2. 2

    Add enctype="multipart/form-data" to the form and a file input with a name.

  3. 3

    Submit the form once. The submission appears in your FormTango inbox and you get an email.

html
<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>Your file <input type="file" name="attachment" accept=".pdf,.doc,.docx,.png,.jpg" required></label>
  <input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Upload</button>
</form>

Good to know

  • File uploads are part of paid plans: up to 5 files and 4 MB per submission.
  • The accept attribute only filters the file picker. The types are checked again on our side.
  • Sending with JavaScript? Pass the form to new FormData(form) and do not set a Content-Type header yourself; the browser sets it with the right boundary.

What you get

  • Every submission saved in an inbox you can search and export.
  • An email for each one, with the visitor's address as the reply-to.
  • Spam filtering without making visitors solve a puzzle.
  • Problems? See troubleshooting.

Related guides

HTML form to emailContact form without a backendSubmit a form without redirectingStop contact form spamA form backend for AI coding agents

Last reviewed November 19, 2026.