What is the difference between the two of FileManager demo

1 Answer 107 Views
FileManager
Stark
Top achievements
Rank 1
Iron
Iron
Stark asked on 08 May 2021, 02:24 PM

I have two link demo from Kendo FileManager.

First link: https://dojo.telerik.com/oFefoyIm

Second link: https://dojo.telerik.com/OxAWOrIF

Each link uses a different method of Kendo FileManager. But, with Second link, I can call function. 

Otherwise, First link can not call.

Two image will show you my test, and And I am having a similar case in First Link in my project, it cannot call the function

 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 12 May 2021, 11:57 AM

Hello Stark,

Please note that as described in the documentation all transport actions (read, update, create, destroy) must be defined in the same way, either as functions or as objects. Mixing the different configuration alternatives is not possible.

In the first example, the transport actions are configured using strings and only the destroy is configured as a function. 

If you need to log a message when a file is successfully removed, I would suggest you subscribe to the command event of the FileManager. In the event handler, you could check the performed action and its status.

 command: function (ev) {
        if (ev.action === "remove" && ev.status == "success") { 
                console.log("item: " + ev.data.item.path + " successfully removed")
        }
 }

Here is a Dojo example where the above is implemented. I hope you will find it helpful. 

Regards,
Neli
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/.

Tags
FileManager
Asked by
Stark
Top achievements
Rank 1
Iron
Iron
Answers by
Neli
Telerik team
Share this question
or