get file(object) info uploader on delete

edited October 1 in Technical questions

Hello, I find solution delete file and ajax request to delete on server.

I need information about an object when I delete it
https://prnt.sc/ur932c

i try event onBeforeDelete, but files.data not have file with id.

$$("filesPhotos").files.attachEvent("onBeforeDelete", function (id) {
console.log(id);
console.log($$("filesPhotos").files.data)
});

What a event need to use delete file and get info about file ?

Tagged:

Comments

  • How to get the deleted object (file)? information on it

  • @Kossin
    did you try this.getItem(id)?

    $$("filesPhotos").files.attachEvent("onBeforeDelete", function (id) {
      console.log(id);
      var item = this.getItem(id);
      console.log(item);
      webix.message(item.name + ": delete cancelled");
      return false;
    });
    
  • edited October 2

    @intregal , i try

    $$("filesPhotos").files.getItem(id);

    Your code work good

    another your help me, health to all those who are dear to you

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!