---
title: "File upload"
description: "Collect files into Google Drive, Box, or S3-compatible storage connected by the workspace."
group: "Build forms"
order: 16
type: "reference"
parent: "fields"
keywords:
  - "file_upload"
  - "maxFiles"
  - "maxFileSizeMb"
  - "accept"
  - "storage"
updated: "2026-07-14"
---

The file-upload field collects one or more files into storage your workspace has connected, and stores file references with the response.

## Options

| Option | Type | Default | Behavior |
| --- | --- | --- | --- |
| `maxFiles` | `number` | `1` | Caps how many files the answer may contain |
| `maxFileSizeMb` | `number` | `500` | Caps each file before upload |
| `accept` | `string[]` | any type | Uses MIME patterns or extensions such as `image/*` and `.pdf` |

The stored value is an array of `{ fileId, name, size, mime, url? }` references. Fillo verifies the upload completed before accepting a reference in a response.

## Add a file-upload field

In the dashboard, connect Google Drive, Box, or S3/R2 under **Settings > Connections** before publishing a form that contains the field. Then select **Add block**, choose **File upload**, and set the count, size, and accepted types.

```ts
const resumeField = {
  id: "resume",
  kind: "file_upload",
  label: "Resume",
  required: true,
  maxFiles: 1,
  maxFileSizeMb: 20,
  accept: [".pdf", ".doc", ".docx"],
} as const;
```

URL prefill doesn't accept file values. Use the SDK upload protocol or the built-in renderer.

## Related

- [Uploads and storage](/docs/uploads): Configure providers, direct uploads, resume behavior, and cleanup.
- [File upload was rejected](/docs/troubleshooting/upload-rejected): Diagnose type, size, session, and storage failures.
- [Build a job application form](/guides/build-a-job-application-form): Combine a file with structured hiring questions.
