1

I'm trying to set the jpegPhoto attribute value to a person inside Openldap. I'm using the Novell Directory libraries, as I couldn't open a connection with the standard Microsoft library. I'm geting the picture as a byte array, and then I convert it to a base 64 string. Then, this value is used in the jpegPhoto attribute. However, it doesn't show properly later in JExplorer

byte[] myPhoto = GetPicture();
string base64PhotoString = Convert.ToBase64String(myPhoto);
attributeSet.Add(new LdapAttribute("jpegPhoto", base64PhotoString));

Is this the proper way to add a picture to an LdapEntry?

Oscar
  • 13,594
  • 8
  • 47
  • 75
  • Can you post a link to OpenLdap's documentation? – Scott Chamberlain May 30 '14 at 14:07
  • @ScottChamberlain Of course! This is the documentation's main page: https://www.novell.com/coolsolutions/feature/11204.html This is the "Samples" folder: ftp://sdk.provo.novell.com/ndk/ldapcsharp/Samples/Samples/ – Oscar May 30 '14 at 17:14

0 Answers0