update to v1.1.0

This commit is contained in:
jomjol
2020-09-06 21:21:04 +02:00
parent 9363873871
commit 78b56ce9d4
8 changed files with 156 additions and 248 deletions

View File

@@ -52,6 +52,38 @@ function dirup() {
window.location.href = res;
}
function deleteall(){
var str = window.location.href;
// str = str.substring(0, str.length-1);
// str = str.substring(10, str.length);
str = str.replace("/fileserver/", "/delete/");
str = str + "?task=deldircontent";
if (confirm("This will delete ALL files in this directory!!!\n\nAre you sure?")) {
alert(str);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
if (xhttp.status == 200) {
// document.open();
// document.write(xhttp.responseText);
// document.close();
location.reload();
} else if (xhttp.status == 0) {
alert("Server closed the connection abruptly!");
location.reload();
} else {
// alert(xhttp.status + " Error!\n" + xhttp.responseText);
location.reload();
}
}
};
xhttp.open("POST", str, true);
xhttp.send();
}
}
function upload() {
var filePath = document.getElementById("filepath").value;
var upload_path = "/upload/" + filePath;