Mod_vcard_ldap jpegPhoto

Hi,

i have a problem to get jpegPhoto working with openldap.

My problem ist the following:

1. I use base64encoding to store my pictures in openldap.
2. Ejabberd encode the picture again with base64 before sent to client.

Finally the client recieved a picture wich is encodes with base64 twice and don't know how to handle.

As i use the binary installer atm (cause of erlang R14A bug), i'm unable to change something in mod_vcard_ldap.erl

This line is in mod_vcard_ldap:

ldap_attribute_to_vcard(vCard, {"photo", Value}) ->
    {xmlelement,"PHOTO",[],[
          {xmlelement,"BINVAL",[],[{xmlcdata, jlib:encode_base64(Value)}]}]};

I'm using php to store the pics in openldap... so it might be possible do disable the first encodeing.

Can anybody pls tell me the best way to store the pics in openldap so ejabberd can handle it?
Or is the only solution to disable the ejabberd encoding in src?

Thanks for any help :D

Syndicate content