Wednesday, May 25, 2011

Display photo on Cisco Mobile 8.1.1 and CUPC

My environment:  UCM, Cisco Mobile 8.1.1, CUP

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.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")
Set objNewUser = Nothing 

1 comment:

Anonymous said...

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