upload() form()
A multi-file upload widget (blueimp jQuery File Upload) from the form2/upload template.
form()->upload($name = '', $desc = '', $extra = [], $replace = [])Options
| Option | Meaning |
|---|---|
$name | Default image. |
desc | Label. |
(template options) | The options go to the template as option, the values as item. |
Example
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