View Single Post
Old 03-10-2005, 10:14 AM  
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
Quote:
Originally Posted by rickholio
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.

tried the code you posted here and got the same result mate
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote