From 089446f5b16ada234a7d3890dfc756311cc8d1d5 Mon Sep 17 00:00:00 2001 From: Rain Li Date: Sun, 28 Aug 2022 22:51:47 +0800 Subject: [PATCH] Fix reload page before all file uploaded bug (#3534) --- weed/server/filer_ui/filer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/server/filer_ui/filer.html b/weed/server/filer_ui/filer.html index 217802dd9..2369f8e87 100644 --- a/weed/server/filer_ui/filer.html +++ b/weed/server/filer_ui/filer.html @@ -288,12 +288,12 @@ function uploadFile(file, i) { var url = window.location.href; var xhr = new XMLHttpRequest(); + var fileName = file.name; xhr.onreadystatechange = function() { if (xhr.readyState == XMLHttpRequest.DONE) { - location.reload(); + finishUpload(fileName) } } - var fileName = file.name; xhr.upload.addEventListener('progress', function(e) { if (e.lengthComputable) { var percent = Math.ceil((e.loaded / e.total) * 100);