Unplanned
Last Updated: 20 Oct 2020 12:04 by ADMIN
Stéphane
Created on: 13 Oct 2020 14:31
Category: FileManager
Type: Feature Request
1
Use custom data model in FileManager (or, at least, add a custom field that can hold a reference)

The FileManager component makes the assumption that all files and directories can be uniquely adressed by name and path.

Unfortunately, this isn't true in many cases: identifying a specific file could require additional information (like database record ID or namespace) that cannot be provided globally for the page and therefore needs to be stored individually with each file entry inside the client's datamodel.

(In my case, different entities in the database have their own "virtual storage" where files are references as items stored in a cloud block storage service. This means that I can several files with the same name and path (but diffreent content) referenced in the database or even several files with the same name and folder linked to the same entity).

As a workaround, if there is no need to represent folder structure at all, the "path" field can be used to hold the database ID of the file and that field can then be used by the Javascript that generate the download link (and other file action URLs).

After trying to use a richer object in the JSON returned to the FileManager Read action, I have come to the conclusiong (confirmed by support), that doing so will break the compnent (rename will not trigger any action on the server, update will cause a JS error inside the kendo libraries).

My suggestion would be to add some additional field to the data model to hold domain-specific information. That field should be handeled in a transparent manner by the Kendo component and it should be made available to any Javascript method. Ideally, I would have loved to be able to add a full set of properties to the client-side object but a single additional string property would actually be enough for everything I need to do.

1 comment
ADMIN
Ivan Danchev
Posted on: 20 Oct 2020 12:04

Hello Stephane,

Thank you for submitting this feature request. I've added a vote for it on your behalf.

We will monitor the interest of the community in this FileManager functionality, and plan it accordingly.

Regards,
Ivan Danchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.