Skip to content
Lazyform
Docs menu

Getting started

File uploads

Accept CVs, photos and documents in your forms. Files are stored privately and sent to you as secure links.

Let visitors attach files: a CV on a job form, photos on a quote request, a brief on a project enquiry. File uploads are on the Pro and Business plans.

Turn it on

In the dashboard, open the form, go to Settings and turn on File uploads. You can set:

  • how many files one submission may have (up to 5),
  • the largest file size (up to 25 MB),
  • which file types are allowed (for example pdf, docx, jpg). Leave it empty to accept any type we support.

Your form

Two things matter: the form must use enctype="multipart/form-data", and each file input needs a name.

html
<form action="https://lazyform-api.xvelopers.com/submit" method="POST" enctype="multipart/form-data">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
  <input type="text" name="name" required>
  <input type="email" name="email" required>
  <input type="file" name="cv" accept=".pdf,.doc,.docx" required>
  <input type="file" name="portfolio" multiple>
  <button type="submit">Apply</button>
</form>

With JavaScript, send new FormData(form) and don't set Content-Type yourself:

js
await fetch('https://lazyform-api.xvelopers.com/submit', {
  method: 'POST',
  headers: { Accept: 'application/json' },
  body: new FormData(form),
})

JSON bodies can't carry files.

What you receive

Files are stored privately in the EU. The notification email, webhooks and integrations get a signed link for each file (https://lazyform-api.xvelopers.com/files/…), valid for 7 days. After that the link answers that it has expired; open the submission in the dashboard for a fresh one. In the dashboard you can open files for as long as the submission is kept.

Each plan includes storage (Pro 5 GB, Business 10 GB). See pricing.

Limits and errors

Limit Value Error
Files per submission 5 at most (or your setting) too_many_files
Size of one file 25 MB at most (or your setting) file_too_large
Whole request 30 MB payload_too_large
File types your allowed list file_not_allowed

Uploads also return file_not_allowed when the feature is off for the form. Want files checked for viruses before they reach you? Connect VirusTotal.