MEME
This commit is contained in:
parent
a33d5c1eb7
commit
03556a1642
@ -581,19 +581,21 @@ async function getFileList() {
|
|||||||
let xhr = new XMLHttpRequest();
|
let xhr = new XMLHttpRequest();
|
||||||
xhr.open('POST', '/upload', true);
|
xhr.open('POST', '/upload', true);
|
||||||
|
|
||||||
|
let tmp;
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
if (xhr.status === 200) {
|
if (xhr.status === 200) {
|
||||||
const resp = JSON.parse(xhr.responseText);
|
const resp = JSON.parse(xhr.responseText);
|
||||||
if (resp.Status == "Success") {
|
if (resp.Status == "Success") {
|
||||||
return resp.Files;
|
tmp = resp.Files;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
tmp = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.send(formData);
|
xhr.send(formData);
|
||||||
|
while (tmp === undefined);
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function listFiles() {
|
async function listFiles() {
|
||||||
|
Loading…
Reference in New Issue
Block a user