From f7b73bb1708bb3d08a361e9b42ca3247a69694a1 Mon Sep 17 00:00:00 2001 From: ethanpil Date: Tue, 17 Jan 2017 13:12:25 -0500 Subject: [PATCH] Option to toggle ability to create new folder --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 93999bf..ac3b49c 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,7 @@ Liscense: MIT // Set to false to disable delete button and delete POST request. $allow_delete = true; +$allow_create_folder= true; /* Uncomment section below, if you want a trivial password protection */ @@ -77,7 +78,7 @@ if($_GET['do'] == 'list') { rmrf($file); } exit; -} elseif ($_POST['do'] == 'mkdir') { +} elseif ($_POST['do'] == 'mkdir' && $allow_create_folder== true) { // don't allow actions outside root. we also filter out slashes to catch args like './../outside' $dir = $_POST['name']; $dir = str_replace('/', '', $dir); @@ -395,10 +396,12 @@ $(function(){
+
+
Drag Files Here To Upload or