Uploading file: MAX_FILE_SIZE gives $_FILES["file"]["type"] != "application/pdf" error
Posted on 2012-04-12
My file upload script worked correctly until i added:
<input type='hidden' name='MAX_FILE_SIZE' value='10000'>
Now when uploading a pdf file, bigger or smaller than 10000 i get the error i set for a file not being: $_FILES["file"]["type"] != "application/pdf".
When i remove the MAX_FILE_SIZE the error does not appear, and uploading works well again.
What's going on here?