]> jfr.im git - uguu.git/blobdiff - static/php/upload.php
fix extension fix
[uguu.git] / static / php / upload.php
index af49a1da5a6d0a463a471d0c1160bdfbf8ef0872..37458a98e85477b862a409b2f4a6c41d6f54cf0a 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * Uguu
  *
- * @copyright Copyright (c) 2022 Go Johansson (nekunekus) <neku@pomf.se> <github.com/nokonoko>
+ * @copyright Copyright (c) 2022 Go Johansson (nokonoko) <neku@pomf.se>
  *
  * 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
@@ -24,11 +24,11 @@ $type = $_GET['output'] ?? 'json';
 $response = (new Core\Response($type));
 
 if (isset($_FILES['files'])) {
-    $uploads = (new Upload())->reFiles($_FILES['files']);
+    $uploads = Upload::reFiles($_FILES['files']);
 
     try {
         foreach ($uploads as $upload) {
-            $res[] = (new Upload())->uploadFile();
+            $res[] = Upload::uploadFile();
         }
         if (isset($res)) {
             $response->send($res);