Browse Source

max file size

isundil 6 years ago
parent
commit
42a118ee29
1 changed files with 1 additions and 1 deletions
  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) {