File uploads

Accept file uploads with FormDB: plan storage, size limits, restricting file types, viewing and downloading files, and files on spam.

This page explains how to accept files through your form, the limits that apply, how to restrict what visitors can upload, and where to find the files afterwards.

Every plan: File uploads are available on all plans, including Free. The Free plan includes 100 MB of file storage, and paid plans include more.

Add a file input to your form

Files must be sent as multipart/form-data. In a plain HTML form, add the enctype attribute:

<form action="https://api.formdb.io/f/your-form-id" method="POST" enctype="multipart/form-data">
  <label for="email">Email</label>
  <input type="email" id="email" name="email" required />

  <label for="attachment">Attachment</label>
  <input type="file" id="attachment" name="attachment" multiple />

  <input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="display:none" />

  <button type="submit">Send</button>
</form>

With JavaScript, send the form as FormData. Do not set a Content-Type header yourself. JSON submissions cannot carry files.

const form = document.querySelector("form");

const response = await fetch("https://api.formdb.io/f/your-form-id", {
  method: "POST",
  headers: { Accept: "application/json" },
  body: new FormData(form),
});

Any file input name works, whether or not you defined a File upload field in the form builder. A field can carry several files. File inputs left empty are ignored.

Limits

Limit

Value

Size of one submission

50 MB, all fields and files together, unless files are uploaded straight to storage

Size per file

10 MB on Free, 25 MB on Starter, 100 MB on Growth, 250 MB on Business

Number of files

No fixed limit

File types

No fixed list

To set your own limits, add a File upload field in the form builder with the same name as your file input, then add rules to it:

  • Max file size: the largest size per file, in MB.
  • Allowed types: a list of file extensions, such as pdf, png, jpg. This checks the extension in the file name, not the file's contents.
  • Min files and Max files: how many files a visitor must or may attach.

See Validation rules for the error messages. A file larger than your plan's per-file limit is rejected with 413 file_too_large.

Large files

To send files bigger than the 50 MB request limit allows, add FormDB's helper script to your page and the data-formdb-uploads attribute to your form:

<script src="https://api.formdb.io/js/formdb.js" defer></script>
<form action="https://api.formdb.io/f/your-form-id" method="POST" enctype="multipart/form-data" data-formdb-uploads>

The script uploads each file straight to storage before the form is sent, so only the per-file limit and your plan's storage apply. The setup page in the dashboard offers this as a snippet option.

Virus scanning

On Starter, Growth and Business, uploaded files are scanned for viruses. An infected file is removed and is never sent to integrations or included in exports. Notifications and integrations run after the scan. On the Free plan files are not scanned, so treat files from the public with the same care as email attachments.

Storage per plan

Each workspace has a total amount of file storage, shared by all of its forms.

Plan

File storage

Largest file

Free

100 MB

10 MB

Starter

2 GB

25 MB

Growth

10 GB

100 MB

Business

50 GB

250 MB

You can see current usage under Settings, then Billing, in the File storage meter.

If a submission's files would not fit in the remaining storage, the whole submission is rejected with 413 storage_full and is not stored. It does not use up a submission from your monthly quota.

Storage is freed when submissions are permanently deleted: when you choose Delete forever in the Trash, when items in the Trash are purged after 30 days, or when you delete the form.

View and download files

  1. Open the form's Submissions tab. Rows with files show a paperclip icon.
  2. Click the row to open the submission.
  3. Files are listed under their field, with name, size and type. Images show a small thumbnail.
  4. Click a file to open it in a new tab.

Images (PNG, JPEG, GIF, WebP, AVIF), PDFs and plain text files open in the browser. Other file types are downloaded.

Files are stored privately. Each file is reached through a signed link, which is a long address that includes an expiry time and a signature.

  • A link is valid for 7 days from the moment it is created.
  • Anyone who has a valid link can open the file without signing in, until the link expires. Share links with that in mind.
  • The dashboard creates fresh links every time you load submissions, so files never become unreachable there.
  • An expired link shows "Link expired or invalid". Open the submission in the dashboard to get a new one.

There are no permanent public file URLs.

Files in emails, exports and integrations

  • Notification emails do not attach files. The email says how many files were attached and links to the submission in FormDB.
  • CSV exports contain file names only.
  • Webhooks include each file's name, size, type and a signed link created at delivery time.
  • Google Sheets and Airtable receive the signed links as text. Because the links expire after 7 days, download files you need to keep, or open them from the FormDB dashboard later.

What happens to files of spam

When the spam filter flags a submission, its files are not stored. The submission's text fields still appear in the Spam folder. If you move such a submission to the Inbox with Not spam, the files cannot be recovered.

Submissions dropped by the honeypot are not stored at all, including their files.

If you downgrade to Free

Storage drops to the Free plan's 100 MB. Files you already have are not deleted by the downgrade itself. They are removed when their submissions are permanently deleted. If your files already use more than 100 MB, new submissions with files are rejected with 413 storage_full until enough space is freed. See Data retention.

Next steps

Ready to try it? Create a free account and send your first submission.