File field
Display type
- file
Config
Name | Description | Notes |
---|---|---|
accept | Type of file to be accepted | For example: image/jpeg,image/png |
filePreview | Whether to preview file in display. Enabled for images only | Type: boolean |
blob | Whether to submit data in binary format on form submission. Else it will be converted to base64 format | Type: boolean |
multiple | Whether to allow multiple file uploads | Type: boolean |
Basic example
Schema Details
{}
fields]
:
[0}
:
{name
:
"aadhaar-file-details"
prop
:
"aadhaar-card"
meta}
:
{type
:
"section"
displayName
:
"Aadhaar Card"
fields]
:
[0}
:
{name
:
"aadhaar_header"
prop
:
NULL
meta
:
{…
}1}
:
{name
:
"aadhaar_file_front"
meta
:
{…
}2}
:
{name
:
"aadhaar_file_back"
meta
:
{…
}1}
:
{name
:
"pan-file-details"
prop
:
"pancard"
meta}
:
{type
:
"section"
displayName
:
"Pan Card"
fields]
:
[0}
:
{name
:
"pan-card-header"
prop
:
NULL
meta
:
{…
}1}
:
{name
:
"pancard_file"
meta
:
{…
}buttons]
:
[0}
:
{name
:
"previous"
meta}
:
{type
:
"previous"
1}
:
{name
:
"next"
meta}
:
{className
:
"bg-gray-800"
type
:
"next"
2}
:
{name
:
"submit"
meta}
:
{type
:
"submit"
className
:
"bg-gray-800"
Example: upload multiple images with preview
Schema Details
{}
fields]
:
[0}
:
{name
:
"upload-photos"
meta}
:
{config}
:
{accept
:
"image/jpeg,image/png"
filePreview
:
true
multiple
:
true
blob
:
true
displayType
:
"file"
displayName
:
"Upload photos"