Test file list
This commit is contained in:
parent
c3d775efaa
commit
ceae8082d6
@ -563,7 +563,7 @@ function uploadFile() {
|
||||
xhr.send(formData);
|
||||
}
|
||||
|
||||
function deleteFile(fileID){
|
||||
function deleteFile(fileID) {
|
||||
let formData = new FormData();
|
||||
formData.append('action', 'deleteFile');
|
||||
formData.append('file_id', fileID);
|
||||
@ -582,9 +582,13 @@ async function listFiles() {
|
||||
|
||||
xhr.onload = function () {
|
||||
if (xhr.status === 200) {
|
||||
displayList(xhr.responseText, "filelist", deleteFile);
|
||||
const resp = JSON.parse(xhr.responseText);
|
||||
if (resp.Status == "Success") {
|
||||
displayList(resp['Files'], "filelist", deleteFile);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
xhr.send(formData);
|
||||
xhr.send(formData);
|
||||
}
|
Loading…
Reference in New Issue
Block a user