mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Fix reload page before all file uploaded bug (#3534)
This commit is contained in:
parent
cc0c8c5f81
commit
089446f5b1
|
@ -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…
Reference in a new issue