Hi @sdirix I try to upload images as custom component but when we pass root name of the schema.json in the customImageTester.ts image upload working file but when we use the actual component name in the customImageTester.ts. So, it will work as a array of strings.
work as array of strings
Code: import { rankWith, scopeEndsWith } from ‘@jsonforms/core’;
export default rankWith(
3, //increase rank as needed
scopeEndsWith(‘images’)
);
Work fine
code: import { rankWith, scopeEndsWith } from ‘@jsonforms/core’;
export default rankWith(
3, //increase rank as needed
scopeEndsWith(‘InspectionData’)
);
schema.json
{
“definitions”: {
“InspectionData”: {
“properties”: {
“images”: {
“type”: “array”,
“items”: {
“type”: “string”,
“format”: “binary”
},
“maxItems”: 6,
“minItems”: 1
},
“occupied”: {
“type”: “boolean”,
“description”: “Is the property occupied”
},
“sample_enum_oneof”: {
“enum”: [
“SOMETHING_TYPE_SINGLE_SELECT_UNSPECIFIED”,
“SOMETHING_TYPE_SINGLE_SELECT_GOOD”,
“SOMETHING_TYPE_SINGLE_SELECT_BAD”,
“SOMETHING_TYPE_SINGLE_SELECT_INDIFFERENT”
],
“oneOf”: [
{
“title”: “Unspecified”,
“description”: “No selection has been made”,
“const”: “SOMETHING_TYPE_SINGLE_SELECT_UNSPECIFIED”
},
{
“title”: “Good”,
“description”: “Mary Had A Little Lamb”,
“const”: “SOMETHING_TYPE_SINGLE_SELECT_GOOD”
},
{
“title”: “Bad”,
“description”: “Something wicked this way comes”,
“const”: “SOMETHING_TYPE_SINGLE_SELECT_BAD”
},
{
“title”: “Indifferent”,
“description”: “Meh, whatever”,
“const”: “SOMETHING_TYPE_SINGLE_SELECT_INDIFFERENT”
}
],
“title”: “Something Type Single Select”,
“description”: “Foo”
},
“sample_enum_multiselect”: {
“items”: {
“enum”: [
“SOMETHING_TYPE_MULTI_SELECT_UNSPECIFIED”,
“SOMETHING_TYPE_MULTI_SELECT_GOOD”,
“SOMETHING_TYPE_MULTI_SELECT_BAD”,
“SOMETHING_TYPE_MULTI_SELECT_INDIFFERENT”
],
“oneOf”: [
{
“title”: “Unspecified”,
“description”: “No selection has been made”,
“const”: “SOMETHING_TYPE_MULTI_SELECT_UNSPECIFIED”
},
{
“title”: “Good”,
“description”: “Mary Had A Little Lamb”,
“const”: “SOMETHING_TYPE_MULTI_SELECT_GOOD”
},
{
“title”: “Bad”,
“description”: “Something wicked this way comes”,
“const”: “SOMETHING_TYPE_MULTI_SELECT_BAD”
},
{
“title”: “Indifferent”,
“description”: “Meh, whatever”,
“const”: “SOMETHING_TYPE_MULTI_SELECT_INDIFFERENT”
}
]
},
“uniqueItems”: true,
“type”: “array”,
“title”: “Something Type Multi Select”
},
“living_room”: {
“$ref”: “#/definitions/sgt.integration.propertydata.v2.LivingRoom”,
“additionalProperties”: true
},
“grass_cut”: {
“$ref”: “#/definitions/sgt.integration.propertydata.v2.GrassCut”,
“additionalProperties”: true
}
},
“additionalProperties”: true,
“type”: “object”,
“title”: “Inspection Data”
}}
Any suggestion or modification in the code?