> ## 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.

# Allowed File Types

> Restrict uploads by type with client-side checks.

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.

<Steps>
  <Step title="Add an accept list">
    ```html theme={null}
    <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.
  </Step>

  <Step title="(Optional) Validate in JavaScript">
    If you want extra control, inspect `file.type` or the filename before submitting and show a helpful error message.
  </Step>
</Steps>

<Callout type="note">
  For strict enforcement, validate on your own server or upload proxy before forwarding to Formbase.
</Callout>
