When the FileManager is defined using TagHelpers the defined schema is not serialized
The following FileManager definition:
<kendo-filemanager name="filemanager" upload-url="@Url.Action("FileManagerUpload", "FileManager")">
<filemanager-datasource>
<transport>
<read url="@Url.Action("FileManagerRead", "FileManager")" type="POST" />
<create url="@Url.Action("FileManagerCreate", "FileManager")" type="POST" />
<destroy url="@Url.Action("FileManagerDestroy", "FileManager")" type="POST" />
<update url="@Url.Action("FileManagerUpdate", "FileManager")" type="POST" />
</transport>
<schema>
<filemanager-model id="path" has-children="hasDirectories">
<fields>
<field name="path" type="string" from="Path"></field>
<field name="name" type="string" from="Name"></field>
<field name="extension" type="string" from="Extension"></field>
<field name="created" type="date" from="Created"></field>
<field name="createdUtc" type="date" from="CreatedUtc"></field>
<field name="modified" type="date" from="Modified"></field>
<field name="modifiedUtc" type="date" from="ModifiedUtc"></field>
<field name="size" type="number" from="Size"></field>
</fields>
</filemanager-model>
</schema>
</filemanager-datasource>
<toolbar>
<items>
<item name="createFolder" />
<item name="upload" />
<item name="sortDirection" />
<item name="sortField" />
<item name="changeView" />
<item name="spacer" />
<item name="details" />
<item name="search" />
</items>
</toolbar>
</kendo-filemanager>
generates the following script, without a schema definition:
<script>
kendo.syncReady(function() {
jQuery("#filemanager").kendoFileManager({
"uploadUrl": "/FileManager/FileManagerUpload",
"toolbar": {
"items": [{
"name": "createFolder"
}, {
"name": "upload"
}, {
"name": "sortDirection"
}, {
"name": "sortField"
}, {
"name": "changeView"
}, {
"name": "spacer"
}, {
"name": "details"
}, {
"name": "search"
}]
},
"dataSource": {
"schema": {
"model": {
"id": "path",
"hasChildren": "hasDirectories"
}
},
"transport": {
"destroy": {
"type": "POST",
"url": "/FileManager/FileManagerDestroy"
},
"read": {
"type": "POST",
"url": "/FileManager/FileManagerRead"
},
"update": {
"type": "POST",
"url": "/FileManager/FileManagerUpdate"
},
"create": {
"type": "POST",
"url": "/FileManager/FileManagerCreate"
}
}
}
});
});
</script>
The FileManager DataSource schema should be serialized