From: Mischa POSLAWSKY Date: Thu, 14 Jun 2018 16:14:07 +0000 (+0200) Subject: edit: optional target upload directory X-Git-Tag: v3.1~3 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/b112c67eb60567b7043f8a26f4778bf6bb562dc4 edit: optional target upload directory Prepare for categorisation, for example supplying user paths. --- diff --git a/edit/index.php b/edit/index.php index 5c5ee3d..6f4dc4d 100644 --- a/edit/index.php +++ b/edit/index.php @@ -13,6 +13,7 @@ if ($_FILES) { throw new Exception('bestand niet goed ontvangen: '.$img['error']); $datadir = implode('/', ['data', date('Y')]); + if ($Args) $datadir .= $Args; if (!file_exists($datadir) and !@mkdir($datadir, 0777, TRUE)) { throw new Exception("bestand kon niet geplaatst worden in $datadir"); }