edit: optional target upload directory
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 14 Jun 2018 16:14:07 +0000 (18:14 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 16 Jun 2018 03:26:18 +0000 (05:26 +0200)
Prepare for categorisation, for example supplying user paths.

edit/index.php

index 5c5ee3d595ae3514e44288cb17ca36eab15ba4d7..6f4dc4d495aa1fc45d3a68db6f68e6107e100211 100644 (file)
@@ -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");
                }