Browse Source

Fix reload page before all file uploaded bug (#3534)

pull/3536/head
Rain Li 3 years ago
committed by GitHub
parent
commit
089446f5b1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/server/filer_ui/filer.html

4
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);

Loading…
Cancel
Save