diff options
Diffstat (limited to 'app/class/controllermedia.php')
-rw-r--r-- | app/class/controllermedia.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/class/controllermedia.php b/app/class/controllermedia.php index 91f5a03..6bc38d9 100644 --- a/app/class/controllermedia.php +++ b/app/class/controllermedia.php @@ -20,10 +20,13 @@ class Controllermedia extends Controller if ($this->user->iseditor()) { if (!$this->mediamanager->basedircheck()) { - throw new Exception("Error : Cant create /media folder"); + throw new Exception("Media error : Cant create /media folder"); } if (!$this->mediamanager->favicondircheck()) { - throw new Exception("Error : Cant create /media/favicon folder"); + throw new Exception("Media error : Cant create /media/favicon folder"); + } + if (!$this->mediamanager->thumbnaildircheck()) { + throw new Exception("Media error : Cant create /media/thumbnail folder"); } @@ -50,7 +53,7 @@ class Controllermedia extends Controller if ($this->user->iseditor()) { $target = $_POST['dir'] ?? Model::MEDIA_DIR; if (!empty($_FILES['file']['name'][0])) { - $this->mediamanager->upload($target); + $this->mediamanager->multiupload('file', $target); } $this->redirect($this->router->generate('media') . '?path=' . $target); } else { |