Upload components
#
Any upload fieldThe AnyUploadField
component renders a file upload field for uploading any file.
- Component - simple
- Component - advanced
- API schema
This advanced upload field is a bit more complex than the Simple component. It has a label, a description, a file name, a file size, a file type, a width and a height. It also has a custom accept mime types.
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store file url. Required |
| ReactNode The label for the field. Required |
| ReactNode The description for the field. |
| undefined | string The name of the column in Contember schema where to store file name. |
| undefined | string The name of the column in Contember schema where to store file size. |
| undefined | string The name of the column in Contember schema where to store file type. |
| undefined | boolean = true If true, the field allows adding new options. |
| undefined | ((options: AcceptFileOptions) => boolean | Promise A function that is called to check if the file is accepted. |
| undefined | string | string[] Accepted mime types. |
#
Audio upload fieldThe AudioUploadField
component renders a file upload field for uploading audio files.
- Component - simple
- Component - advanced
- API schema
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store file url. Required |
| ReactNode The label for the field. Required |
| ReactNode The description for the field. |
| undefined | string The name of the column in Contember schema where to store file name. |
| undefined | string The name of the column in Contember schema where to store file size. |
| undefined | string The name of the column in Contember schema where to store file type. |
| undefined | boolean = true If true, the field allows adding new options. |
| undefined | ((options: AcceptFileOptions) => boolean | Promise A function that is called to check if the file is accepted. |
| undefined | string | string[] Accepted mime types. |
#
Image upload fieldThe ImageUploadField
component renders a file upload field for uploading image files.
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store file url. Required |
| ReactNode The label for the field. Required |
| ReactNode The description for the field. |
| undefined | string The name of the column in Contember schema where to store file name. |
| undefined | string The name of the column in Contember schema where to store file size. |
| undefined | string The name of the column in Contember schema where to store file type. |
| undefined | string The name of the column in Contember schema where to store height. |
| undefined | string The name of the column in Contember schema where to store width. |
| undefined | boolean = true If true, the field allows adding new options. |
| undefined | ((options: AcceptFileOptions) => boolean | Promise A function that is called to check if the file is accepted. |
| undefined | string | string[] Accepted mime types. |
| (options: RenderFilePreviewOptions Renders the file preview. |
#
Video upload fieldThe VideoUploadField
component renders a file upload field for uploading video files.
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store file url. Required |
| ReactNode The label for the field. Required |
| ReactNode The description for the field. |
| undefined | string The name of the column in Contember schema where to store file name. |
| undefined | string The name of the column in Contember schema where to store file size. |
| undefined | string The name of the column in Contember schema where to store file type. |
| undefined | string The name of the column in Contember schema where to store height. |
| undefined | string The name of the column in Contember schema where to store width. |
| undefined | boolean = true If true, the field allows adding new options. |
| undefined | ((options: AcceptFileOptions) => boolean | Promise A function that is called to check if the file is accepted. |
| undefined | string | string[] Accepted mime types. |
#
Any file repeaterThe AnyFileRepeater
component renders a repeater field for uploading any file.
#
Audio file repeaterThe AudioFileRepeater
component renders a file repeater field for uploading audio files.
- Component - simple
- Component - advanced
- API schema
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| string The name of the column in Contember schema where to store file url. Required |
| ReactNode The label for the field. Required |
| undefined | string The name of the column in Contember schema that is used to sort the options. |
| undefined | string The name of the column in Contember schema that is used to order the options. |
| ReactNode The description for the field. |
| undefined | string The name of the column in Contember schema where to store file name. |
| undefined | string The name of the column in Contember schema where to store file size. |
| undefined | string The name of the column in Contember schema where to store file type. |
| undefined | string The name of the column in Contember schema where to store height. |
| undefined | string The name of the column in Contember schema where to store width. |
| undefined | boolean = true If true, the field allows adding new options. |
| undefined | ((options: AcceptFileOptions) => boolean | Promise A function that is called to check if the file is accepted. |
| undefined | string | string[] Accepted mime types. |
#
Image file repeaterThe ImageFileRepeater
component renders a file repeater for uploading image files.
- Component - simple
- Component - advanced
- API schema
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| string The name of the column in Contember schema where to store file url. Required |
| ReactNode The label for the field. Required |
| undefined | string The name of the column in Contember schema that is used to sort the options. |
| undefined | string The name of the column in Contember schema that is used to order the options. |
| ReactNode The description for the field. |
| undefined | string The name of the column in Contember schema where to store file name. |
| undefined | string The name of the column in Contember schema where to store file size. |
| undefined | string The name of the column in Contember schema where to store file type. |
| undefined | string The name of the column in Contember schema where to store height. |
| undefined | string The name of the column in Contember schema where to store width. |
| undefined | boolean = true If true, the field allows adding new options. |
| undefined | ((options: AcceptFileOptions) => boolean | Promise A function that is called to check if the file is accepted. |
| undefined | string | string[] Accepted mime types. |
#
Video file repeaterThe VideoFileRepeater
component renders a file repeater for uploading video files.
- Component - simple
- Component - advanced
- API schema
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| string The name of the column in Contember schema where to store file url. Required |
| ReactNode The label for the field. Required |
| undefined | string The name of the column in Contember schema that is used to sort the options. |
| undefined | string The name of the column in Contember schema that is used to order the options. |
| ReactNode The description for the field. |
| undefined | string The name of the column in Contember schema where to store file name. |
| undefined | string The name of the column in Contember schema where to store file size. |
| undefined | string The name of the column in Contember schema where to store file type. |
| undefined | boolean = true If true, the field allows adding new options. |
| undefined | ((options: AcceptFileOptions) => boolean | Promise A function that is called to check if the file is accepted. |
| undefined | string | string[] Accepted mime types. |