Wednesday, May 25, 2011

Display photo on Cisco Mobile 8.1.1 and CUPC

My environment:  UCM 8.5.1.10000-26, Cisco Mobile 8.1.1, CUP 8.5.2.10000-49

Cisco Mobile default will use the LDAP jpegPhoto field to store the photo, for CUP you need to configure in

CUP > Applications > CUPC > Settings

Map the Photo user fields to LDAP jpegPhoto attributes



















MS doesn't provide a UI to upload the photo to the jpegPhoto attribute, after some research I have modified a VB script and I am using it for my photo upload:


Function ReadBinaryFile(FileName)
Const adTypeBinary = 1
Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile = BinaryStream.Read
End Function 


Set objNewUser = GetObject("LDAP://localhost:389/cn=1234567,ou=bamboo,ou=panda,dc=pandaeatsbamboo,dc=com")
objNewUser.Put "jpegPhoto", ReadBinaryFile("1234567.jpg")
objNewUser.SetInfo
Set objNewUser = Nothing 


1 comment:

  1. Good post and clear instruction, it saves me lots of time!

    ReplyDelete