File Download ['ERROR'] = 2

I keep getting the error loading file 2, I know this means that the file is larger than MAX_FILE_SIZE, which I set in the HTML form, but it is not. This is only 32kb when I set the value of MAX_FILE_SIZE = "100000". Why should I get this error? I already checked the size of the downloaded file and the settings for sending messages in my php.ini, and this is not a problem either.

<form enctype="multipart/form-data" method="post" action="upload_img.php"> <input type="hidden" name="MAX_FILE_SIZE" value="100000"/> <input type="text" name="name" value=""/> <input type="file" name="picture" value="picture"/> <input type="submit" name="submit" value="upload"/> </form> 
+4
source share
1 answer

Take this off:

 <input type="hidden" name="MAX_FILE_SIZE" value="100000"/> 

And at the input "picture" set an empty value:

 <input type="file" name="picture" value=""/> 
+12
source

Source: https://habr.com/ru/post/1402337/


All Articles