I am trying to create Ajax logging feature for elFinder so I added event handlers:
'elfinder': {
handlers : {
add : function(event, elfinderInstance) {
console.log(event.data);
//console.log(event.data.selected); // selected files hashes list
},
remove : function(event, elfinderInstance) {
console.log(event.data);
//console.log(event.data.selected); // selected files hashes list
}
}
}
From add event I get all data I need, part of the nested object data for example:
hash: "l1_UypQLTJfOC9TY3JlZW5zaG90IDIwMjEtMDMtMTEgYXQgMTUuMTguNDcucG5n"
isowner: false
mime: "image/png"
name: "Screenshot 2021-03-11 at 15.18.47.png"
phash: "l1_UypQLTJfOA"
read: 1
size: "60591"
tmb: 1
ts: 1616364008
url: "/php/../files/S%2AP-2_8/Screenshot%202021-03-11%20at%2015.18.47.png"
write: 1
Most importantly url and name of the added file.
But on remove I get only:
0: "l1_UypQLTJfOC9TY3JlZW5zaG90IDIwMjEtMDMtMTEgYXQgMTUuMTguNDcucG5n"
length: 1
How can I log removed file name in eFinder?
Reference: https://github.com/Studio-42/elFinder/issues/2011