Hello!
I've written a script that accepts an image uploadeded through POST, and I have an interesting bug.
Basically, the script works fine if the image has no spaces in it's name, but fails otherwise. This is especially interesting because my script never uses the original filename. Basically, I read the temporary file into a GD image like so:
$image = imagecreatefromjpeg($_FILES['image']['tmp_name']);
Then I do various transformations into another GD image called $thumb and then write it out to a file:
imagejpeg($thumb, $local_picture_filename, $JPEG_COMPRESSION);
If the original file had spaces in its name, the file that gets written to the disk is 0 bytes. If the file had no spaces, it's fine, everything is grand.
Can anyone help me solve this mystery? I tried to attach the entire script, (had to change the extension) in case that helps.
Thanks,
Erik