From ca4e0cbb1471e837197cd2ed30b1ea3c274ab41d Mon Sep 17 00:00:00 2001 From: Alex Vitkov Date: Sat, 13 Feb 2021 00:51:39 +0200 Subject: Upload.php now can upload in direcotires other than root --- loggedin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'loggedin.js') diff --git a/loggedin.js b/loggedin.js index c84f650..a2c211b 100644 --- a/loggedin.js +++ b/loggedin.js @@ -6,6 +6,7 @@ const filename_input = document.getElementById("filename"); const upload_btn = document.getElementById("upload_btn"); const the_path = document.getElementById("the_path"); const current_directory = document.getElementById("current_directory"); +const upload_parent_directory = document.getElementById("upload_parent_directory"); the_file.onchange = on_file_added; @@ -36,7 +37,8 @@ var files = []; function on_file_added(_e) { if (the_file.files.length >= 1) { - filename_input.value = the_file.files[0].name; + filename_input.value = the_file.files[0].name; + upload_parent_directory.value = get_path(); if (!FORM_ASYNC) { upload_form.submit(); -- cgit v1.2.3