View Single Post
Old 03-09-2005, 03:59 PM  
rickholio
Confirmed User
 
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
Aha, I think I have it.

I did a 'strings' on your 04b.gif file and found the following:

-----------------------------7d51181aaf4
Content-Disposition: form-data; name="imagefile"; filename="C:\backup\guitarstuff\project\tgp\xf\1\0 4.jpg"
Content-Type: image/pjpeg

It would appear that you're saving the entire raw response string, and not purely the image itself. It maybe the way the file gets handled in the code?

Here's what I've used in the past:

Code:
      if(is_uploaded_file($_FILES[img][tmp_name])) {
         $szarr = getimagesize($_FILES[img][tmp_name]);
         if($szarr[2]=IMAGETYPE_JPEG) move_uploaded_file($_FILES[img][tmp_name], $file_target);
      }
The only other alternative is that your webserver is not correctly separating out the different form submission elements, in which case you have bigger problems.

HTH.
rickholio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote