From: Ken D. <ken...@sy...> - 2001-01-25 22:08:00
|
Excuse a newbie question, but I am trying to do something simple and add an entry to a Netscape Directory via perl-ldap with a jpeg photo. The problem I am having is that the jpeg photo doesn't seem to get added correctly. I am using the same basic sample code from the Mozilla FAQ: $filename="test.jpg"; if (-e $fileName) { open(JPEG, $fileName) || die; while (sysread JPEG, $buf, 1024) { $jpegimage .= $buf; } } else { open(JPEG, $NOPHOTOJPG) || die; $jpegimage=<JPEG>; while (sysread JPEG, $buf, 1024) { $jpegimage .= $buf; } } $entry->{jpegphoto} = $jpegimage; Anyone had problems using this code to add binary data such as a jpeg photo to the Netscape 4.1 directory server? Thanks, Ken ========================= Ken DeLay Senior Consultant Syntegra (USA) Phone: (303)-205-1621 email: ken...@sy... ========================= |