easy-forms
Form components

File

File uploads with accept filters and size/count constraints.

Stores File[] | null.

Preview
Live

Options

PropTypeDefaultDescription
acceptRecord<string, string[]>Accepted MIME types mapped to extensions, e.g. { "image/*": [".png", ".jpg"] }.
multiplebooleanAllow selecting more than one file.
maxFilesnumberMaximum number of files.
maxSizeMBnumberMaximum size per file, in megabytes.
minSizeMBnumberMinimum size per file, in megabytes.

Client-side size and type constraints are a UX convenience, not a security boundary. Always re-validate uploads on the server. See Security.

On this page