This is a bit problematic upload.getElement().getProperty("files") gives the current list of the files as json array. I would assume that you can find “abort = true” in the file which was removed from the list.
Tatu Lund:
This is a bit problematic upload.getElement().getProperty("files") gives the current list of the files as json array. I would assume that you can find “abort = true” in the file which was removed from the list.
The property doesn’t exist. Not in the file-abort not in the file-remove event either. Hmmm…
I tried to extend the Upload-class add the following in the MyUpload-constructor:
public MyUpload(Receiver receiver) {
super(receiver);
final String elementFiles = "element.files";
DomEventListener myListener = e -> {
JsonArray files = e.getEventData().getArray(elementFiles);
System.out.println("add event date");
};
getElement().addEventListener("file-remove",myListener).addEventData(elementFiles);
}
Then, I get a json with the details of status for the file-remove/abort-Event: