问题
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?
来源:https://stackoverflow.com/questions/23930887/openldap-add-jpegphoto-to-inetorgperson