fileupload - renders a file uploader for images or regular files.
avatar: label: Avatar type: fileupload mode: image imageHeight: 260 imageWidth: 260
The following field properties are supported and commonly used.
|label||a name when displaying the form field to the user.|
|default||specifies a default string value, optional.|
|comment||places a descriptive comment below the field.|
|mode||the expected file type, either file or image. Default: |
|size||for multiple uploads, the size of the container. Available options: tiny, small, large, huge, giant. Default: |
|imageWidth||if using image type, the image will be resized to this width, optional|
|imageHeight||if using image type, the image will be resized to this height, optional|
|fileTypes||file extensions that are accepted by the uploader, optional. Eg: |
|mimeTypes||MIME types that are accepted by the uploader, either as file extension or fully qualified name, optional. Eg: |
|maxFilesize||file size in Mb that are accepted by the uploader, optional. Default: from "upload_max_filesize" param value|
|maxFiles||maximum number of files allowed to be uploaded|
|useCaption||allows a title and description to be set for the file. Default: |
|thumbOptions||additional resize options for generating the thumbnail, or pass |
|deferredBinding||use deferred binding when uploading a file, when available. Disable this to attach the file immediately on upload instead of when saving. Default: |
Unlike the Media Finder form widget, the File Upload form widget uses database file attachments so the field name be that of an
attachMany relationship attribute on your associated model.