Openldap: Add jpegPhoto to inetOrgPerson

微笑、不失礼 提交于 2020-01-06 02:46:06

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!