diff --git a/src/main/java/com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java b/src/main/java/com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java index 4557e91..c7ee1c2 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java +++ b/src/main/java/com/flowingcode/vaadin/addons/uploadhelper/FileInfo.java @@ -82,6 +82,7 @@ private void update(boolean createIfNotExists) { if ($1) d.files = [... d.files, $0]; else return; } else { if (d.files.some((e,j)=>e.name==$0.name && j>i)) d.files=d.files.filter((e,j)=>e.name!=$0.name || j<=i); + delete $0.name; d.files[i] = Object.assign(d.files[i], $0); } d.files = Array.from(d.files);