[Date Prev][Date Next]
RE: jpegPhoto in ldif file -viewing
Once I tried a newer client navigator 4.5 and 4.61 it work fine. I also had
to put back in the extra colon that I tried taking out since it looked
Thanks for the responses,
> From: Chris Ridd[SMTP:Chris.Ridd@MessagingDirect.com]
> Sent: Wednesday, July 28, 1999 2:35 AM
> To: Wiersema, Todd
> Subject: Re: jpegPhoto in ldif file -viewing
> On Tue, 27 Jul 1999 12:00:38 MDT, "Wiersema, Todd" wrote:
> > Once the jpeg is base 64 encoded and in ldap, how is it viewed? I tried
> > ldap url in netscape 4.07 and it just displayed the encoded text. Do I
> > a different client that converts back and displays the image correctly
> or do
> > I have another problem? Is there another approach commonly used for
> > via web?
> > ldap://www2/uid=testme1,o=my.com,c=us
> > Object
> > Class
> > newPilotPerson
> > uid
> > testme1
> > Name
> > test
> > Last Name
> > me
> > Photograph
> > /9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAU ...
> > ldif file
> > test.ldif
> > dn: uid=testme1,o=lmco.com,c=US
> > objectclass: newPilotPerson
> > uid: testme1
> > cn: test
> > sn: me
> > userpassword: secret
> > jpegPhoto: /9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAUDBAQ ...
> > Thanks,
> > Todd
> You're confused I think, between what bytes should go over the network,
> and what should be stored in an LDIF file.
> They are not the same.
> You shouldn't be concerned about how the server stores these values,
> all you should care about is how they travel over the network (that's
> the point after all, of using a standardised protocol.)
> The bytes that go over the network are *just* the contents of the JPEG
> file. Not converted to hex, or base 64, or anything. Just the bytes.
> Because it is hard to store arbitrary bytes in a text file (ie the LDIF
> file) the LDIF spec (you should read this spec, of course, instead of
> relying on someone else to interpret it for you) says that you have to
> put the base-64 encoding of the JPEG file contents into the LDIF file.
> You also have to mark in the LDIF file that base-64 encoding is being
> used by putting two colons after the attribute type.
> So your LDIF file should be something like:
> jpegPhoto:: /9j/4AAQSkZJRg...
> The server should refuse to store non-JPEG values (like URLs) in a
> jpegPhoto attribute. If it doesn't, it is a serious defect in the