File upload form

A file upload form that sends a file alongside the usual text fields, posting multipart form data straight to Formpaste. The backend is wired in, spam is filtered, and there is no CAPTCHA and no upload endpoint of your own to build.

How to use this form

  1. Create a form in your Formpaste dashboard and copy its access key.
  2. Paste the template below into your project and swap YOUR_ACCESS_KEY_HERE for your key.
  3. Set your destination email and allowed domains in the dashboard.
  4. Deploy - submissions land in your inbox, spam filtered, no CAPTCHA.

Framework guides for this form

Prefer a guide for your exact stack? Open the per-framework walkthrough.

What is a file upload form?

A file upload form lets a visitor attach a file, an image, a document, a resume, a screenshot, along with the usual text fields, and send it all in one submission. The moment a form has a file input, it can no longer post as plain url-encoded data; it has to post multipart form data instead. This template handles that switch for you.

The generated code sets the right enctype, multipart/form-data, and sends the raw FormData, so the file rides along with the other fields in a single request. You do not write an upload endpoint, and your app never has to receive, buffer, or parse the file. The browser posts it directly to Formpaste, which sidesteps serverless body-size and runtime limits that trip up self-hosted upload handling entirely.

When to use it

Reach for a file upload form whenever a submission is incomplete without an attachment. Job applications need a resume, support requests often need a screenshot, design feedback needs the file in question, and claims or registrations frequently need a document. If “please attach” is part of the ask, this is the form.

It is the right pattern any time you want the file and the context together in one place, rather than a text form plus a separate “email us the file” step. One submission, both parts, no reassembly. If you never actually need an attachment, a plain form is lighter; add the file field only when the file is genuinely part of the request.

What to include

This template pairs a file with just enough context to make it useful. Name and email are required, so you know who sent the upload and can reply. The file field itself is required, so no submission arrives without the attachment that is the whole point. A message textarea is optional, giving the sender room to explain what the file is or what they need done with it.

Be honest with people about what you accept. Put the accepted types and a rough size limit in the label or a note near the input, so someone does not fill out the form only to have an oversized or wrong-format file bounce. One operational note: file uploads are a Pro feature, so connect Storage in the dashboard before you ship this form, or the submission will have nowhere to put the file.

Tips for a file upload form that just works

Let the backend own the multipart submit. The generated code already sets enctype and posts the raw FormData, so the file and the text fields go together in one request. Do not build a parallel upload flow; the direct browser-to-Formpaste post is what keeps your own app out of the file-handling business.

Set expectations before the upload, not after. Tell people the accepted types and the size ceiling up front. A clear “PDF or PNG, up to 10 MB” line prevents the most frustrating failure, a completed form rejected at the last second over a file that was never going to work.

Connect Storage first. Because uploads are a Pro feature, wire up Storage in the dashboard before this form goes live. Confirm a test upload lands where you expect, so the first real submission is not the moment you discover the destination was never set.

Also works on

No dedicated guide yet, but this form drops into any of these too. Open the platform overview to get started.

Frequently asked questions

Paste a form. Get submissions.

Instantly without setting up any backend, servers or databases. 250 submissions/mo free - no credit card.

More form templates