A dropzone takes files dropped on it, chosen with the file picker, or pasted. Folders dropped are read through, and each file keeps its path.

Every file is checked against accept, maxSize, minSize, maxFiles and your validate function, and the ones turned away are listed with the reason. Images get a preview.

Without an upload function, the dropzone holds the files for a form, in [(files)]. With one, it uploads them a few at a time, with progress, cancel and retry. Pass the upload’s signal to fetch, so canceling stops it.

Uploads

A pretend upload reports its progress in steps. Files named with “fail” fail, to show retry, and directory adds a button to choose a folder.

Uploaded: 0

Attachments for a form

No upload: the dropzone holds up to three documents in [(files)], and its own text replaces the default one.

0 of 3 attached, 0 kB