Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.formbase.dev/llms.txt

Use this file to discover all available pages before exploring further.

Formbase does not enforce file type restrictions on the server. If you want to limit uploads to certain file types, enforce it in your UI and (if needed) in your own backend before sending the file to Formbase. The simplest approach is to use the accept attribute on your file input.
1

Add an accept list

<form
  action="https://formbase.dev/s/YOUR_FORM_ID"
  method="POST"
  enctype="multipart/form-data"
>
  <input name="resume" type="file" accept=".pdf,.doc,.docx" />
  <button type="submit">Upload</button>
</form>
Most browsers will only let users pick matching file types.
2

(Optional) Validate in JavaScript

If you want extra control, inspect file.type or the filename before submitting and show a helpful error message.
For strict enforcement, validate on your own server or upload proxy before forwarding to Formbase.