upload() form()

A multi-file upload widget (blueimp jQuery File Upload) from the form2/upload template.

form()->upload($name = '', $desc = '', $extra = [], $replace = [])

Options

OptionMeaning
$nameDefault image.
descLabel.
(template options)The options go to the template as option, the values as item.

Example

Select file...

Code

return form()->upload('photos', 'Photos');

Notes

  • The upload endpoint is your module action: check type and size, and store the files under generated names.

See also: form/file