X-Git-Url: https://jfr.im/git/uguu.git/blobdiff_plain/8220242883f89283cd6bda196d635ffc3d5ecea2..86f819edee94f108a6636af468729fcb332d54b5:/static/php/upload.php diff --git a/static/php/upload.php b/static/php/upload.php index 3a9b0f9..27ff3e3 100644 --- a/static/php/upload.php +++ b/static/php/upload.php @@ -2,7 +2,7 @@ /* * Uguu * - * @copyright Copyright (c) 2022 Go Johansson (nekunekus) + * @copyright Copyright (c) 2022 Go Johansson (nokonoko) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,9 +28,11 @@ if (isset($_FILES['files'])) { try { foreach ($uploads as $upload) { - $res[] = (new Upload())->uploadFile($upload); + $res[] = (new Upload())->uploadFile(); + } + if (isset($res)) { + $response->send($res); } - $response->send($res); } catch (Exception $e) { $response->error($e->getCode(), $e->getMessage()); }