You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/forms.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -863,16 +863,16 @@ avatar:
863
863
864
864
Option | Description
865
865
------------- | -------------
866
-
`mode` | the expected file type, either file or image. Default: image.
866
+
`mode` | the expected file type, either `file` or `image`. Default: `image`.
867
867
`imageWidth`| if using image type, the image will be resized to this width, optional.
868
868
`imageHeight`| if using image type, the image will be resized to this height, optional.
869
869
`fileTypes` | file extensions that are accepted by the uploader, optional. Eg: `zip,txt`
870
870
`mimeTypes` | MIME types that are accepted by the uploader, either as file extension or fully qualified name, optional. Eg: `bin,txt`
871
871
`maxFilesize` | file size in Mb that are accepted by the uploader, optional. Default: from "upload_max_filesize" param value
872
-
`useCaption` | allows a title and description to be set for the file. Default: true
872
+
`useCaption` | allows a title and description to be set for the file. Default: `true`
873
873
`prompt`| text to display for the upload button, applies to files only, optional.
874
874
`thumbOptions`| options to pass to the thumbnail generating method for the file. See [Image Resizing](../services/image-resizing#available-parameters)
875
-
`attachOnUpload`| Automatically attaches the uploaded file on upload if the parent record exists instead of using deferred binding to attach on save of the parent record. Defaults to false.
875
+
`attachOnUpload`| Automatically attaches the uploaded file on upload if the parent record exists instead of using deferred binding to attach on save of the parent record. Defaults to `false`.
876
876
877
877
> **NOTE:** Unlike the [Media Finder FormWidget](#media-finder), the File Upload FormWidget uses [database file attachments](../database/attachments); so the field name must match a valid `attachOne` or `attachMany` relationship on the Model associated with the Form. **IMPORTANT:** Having a database column with the name used by this field type (i.e. a database column with the name of an existing `attachOne` or `attachMany` relationship) **will** cause this FormWidget to break. Use database columns with the Media Finder FormWidget and file attachment relationships with the File Upload FormWidget.
0 commit comments