how-to
Receive File Uploads on Your Form
Let visitors attach files to your form and get them as secure download links
Receiving files from your form
Un-static Forms can receive file uploads from your visitors - job-application CVs, support screenshots, photos, signed PDFs. You don’t run any backend: add a file field to your HTML form, and we store the upload and e-mail you a secure, expiring download link (we don’t attach the raw file to the mail).
File uploads are available on our paid plans (Basic and Premium). On the free plan, and on forms that aren’t linked to an account, the text of a submission still comes through, but any attached files are dropped with a note.
Step 1. Add a file input and set the form encoding
Two changes to your form: add enctype="multipart/form-data" to the <form> tag, and add one or more <input type="file"> fields. Add multiple if you want to allow several files in a single field.
<form method="post" action="https://forms.un-static.com/forms/YOUR_ENDPOINT_REFERENCE" enctype="multipart/form-data">
<input type="text" name="name" placeholder="Enter your name" required>
<input type="email" name="email" placeholder="Enter your e-mail address" required>
<textarea name="message" cols="40" rows="10"></textarea>
<label for="attachment">Attach a file</label>
<input type="file" name="attachment" id="attachment">
<button type="submit">Send</button>
<div class="text-center">
<p><small>(Powered by <a rel="nofollow" href="https://un-static.com">Un-static Forms</a>)</small></p>
</div>
</form>
There’s nothing to configure on our side - linked paid-plan forms accept uploads automatically.
What you can receive
- File types: images (PNG, JPG, GIF, WebP), PDF, Office documents (DOC, DOCX, XLS, XLSX, PPT, PPTX), text and CSV, and ZIP archives. Executables and scripts are rejected.
- Size limits: up to 25 MB per file and 50 MB per submission.
- Storage: your plan includes a storage allowance - 1 GB on Basic, 10 GB on Premium. See the plan comparison.
If a file is too big, of a disallowed type, or would exceed your storage, that one file is dropped and we note it in your notification - the rest of the submission still reaches you.
How you receive the files
Your notification e-mail and your submission archive contain a secure download link for each accepted file, rather than the file itself. The links are signed and expire when the submission is removed at the end of your plan’s retention period, so older submissions’ files aren’t downloadable forever.
Uploading via AJAX
If you submit your form with JavaScript instead of a normal page submit, send the data as FormData (multipart) - a JSON body can’t carry files. Post it to your /ajax endpoint:
<script>
const form = document.querySelector('#contact-form');
form.addEventListener('submit', async (e) => {
e.preventDefault();
const data = new FormData(form); // includes the file input
data.append('g-recaptcha-response', grecaptcha.getResponse());
const res = await fetch('https://forms.un-static.com/forms/YOUR_ENDPOINT/ajax', {
method: 'post',
body: data, // don't set Content-Type; the browser adds the multipart boundary
});
// ... handle the JSON response ...
});
</script>
AJAX submissions need your own reCAPTCHA - see the AJAX contact form guide for that setup.
Let us know if you run into any issues!