Explorar el Código

max file size

isundil hace 6 años
padre
commit
42a118ee29
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      api.php

+ 1 - 1
api.php

@@ -107,7 +107,7 @@ if (isset($_GET["command"])) {
         }
         if ($_FILES["file"]["size"] > MAX_ALLOWED_UPLOAD_SIZE) {
             header("HTTP/1.0 400 Bad Request");
-            die("File is too large");
+            die("File is too large (max " .MAX_ALLOWED_UPLOAD_SIZE ."o, got " .$_FILES["file"]["size"] .')');
         }
         $filename = md5($_GET["from"].time()) .$extension;
         if (move_uploaded_file($_FILES["file"]["tmp_name"], getcwd()."/uploads/".$filename) === FALSE) {