In an earlier post, I noted that I was unable to use the POST method in a form to upload any jpg file via POST; no problem with other types. It returned an error value of 2 and a null filename and type.
Just on a hunch, I renamed the source filename so the JPG extension was all uppercase. BINGO! The upload worked.
The really weird part, though, was that after this, ALL jpgs uploaded just fine -- regardless of case -- including the file I had previously renamed.
Can anyone explain this??
Code fragment:
<?php
print "name: " . $FILES["userfile"]["name"] . "<br>";
print "type: " . $FILES["userfile"]["type"] . "<br>";
print "size: " . $FILES["userfile"]["size"] . "<br>";
print "tmp_name: " . $FILES["userfile"]["tmp_name"] . "<br>";
print "error: " . $_FILES["userfile"]["error"];
?>
<FORM ENCTYPE="multipart/form-data" ACTION="<? $PHP_SELF ?>" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="999999999">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>