Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Uploading pics to ldap through webapp

by ramlight (Friar)
on May 29, 2009 at 17:10 UTC ( [id://766895]=note: print w/replies, xml ) Need Help??


in reply to Uploading pics to ldap through webapp

Are you sure that the jpeg that you are sending really is a jpeg?

Jpegs start with the characters "JFIF" while Gifs start with the characters "GIF".

Your error message suggests that your jpeg starts with "G:" (0x47 0x3a)

  • Comment on Re: Uploading pics to ldap through webapp

Replies are listed 'Best First'.
Re^2: Uploading pics to ldap through webapp
by ksublondie (Friar) on May 29, 2009 at 18:58 UTC
    I finally got it to work with just GD::Image->new($photo). I don't know why I didn't try that to begin with :-)
Re^2: Uploading pics to ldap through webapp
by ksublondie (Friar) on May 29, 2009 at 18:34 UTC
    I looked at the data and it sure enough starts with 'JFIF'. Of course I'm able to view the jpgs in any graphic editor that I tried. I even tried to 'save as...' another jpg in case the files were corrupted. I have tried dozens of jpgs all with the same result. None have worked so I doubt it's a problem with the files.

    That's interesting that the 'starts with' translates into 'G:'. That is the drive that I'm pulling the images from and if I try pics from my H drive, the error changes to 0x48. So apparently, $q->upload('photo') returns the filename. So why does newFromGif() return an image, but not newFromJpeg() when the documentation describes them as similar functions?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://766895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-19 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found