Hi all,
Been having a really wierd problem with file upload code. If I upload text files/word docs etc to my server they arrive in one piece and in good working order. If I try to do the same with images files they appear to get truncated and then fail to display.
An abbreviated version of the code I'm using appears below - anyone got an answer/seen similar behaviour ?
Cheers
Chris
Abbreviated code example:
<form enctype='multipart/form-data' action='/pagetemplate.php?source=fileupload.html' method=post>
<input type='hidden' name='doupload' value='true'>
<input type=hidden name='MAX_FILE_SIZE' value='102400'>
<!-- rest of form etc here -->
</form>
The PHP which deals with the upload relies on a simple copy command using $userfile to specify the filename to copy over. When completed, a file with the desired filename exists in the target directory but it's many, many bytes shorter than the original file ...