ejabberd - Comments for "avatar not recognised by client" https://www.ejabberd.im/node/2920 en Re: avatar not recognised by client https://www.ejabberd.im/node/2920#comment-52056 <p>Right, the value is stored in base64, so, here is a problem: what happens if we will not encode the data with base64, but the data is stored in raw binary (not base64)? For example, my OpenLDAP stores avatars in raw binary.</p> Tue, 25 Mar 2008 14:27:38 +0000 xram@jabber.ru comment 52056 at https://www.ejabberd.im Recovered, check binvalues.txt https://www.ejabberd.im/node/2920#comment-52054 <div class="quote-msg"> <div class="quote-author"><em>xram@jabber.ru</em> wrote:</div> <p>could you show the whole data in PHOTO element?</p></div> <p>Vetetix provided the whole binary data in his original message. But I removed the binary content and left only a few characters because the text was completely unreadable.</p> <p>I recovered the binary content from a backup, check the file <noindex><a href="/files/efiles/binvalues.txt" rel="nofollow" >binvalues.txt</a></noindex>.</p> Tue, 25 Mar 2008 09:09:04 +0000 mfoss comment 52054 at https://www.ejabberd.im Re: avatar not recognised by client https://www.ejabberd.im/node/2920#comment-52051 <div class="quote-msg"> <div class="quote-author"><em>vetetix</em> wrote:</div> <p>The avatars are stored in base64 encoding in openldap</p></div> <p>Are you sure about that? It is a stupid idea to store binary data in base64 encoding in openldap.<br /> Anyway, could you show the whole data in PHOTO element?</p> Tue, 25 Mar 2008 02:22:50 +0000 xram@jabber.ru comment 52051 at https://www.ejabberd.im ejabberd reencodes to base64 https://www.ejabberd.im/node/2920#comment-52047 <div class="quote-msg"> <div class="quote-author"><em>vetetix</em> wrote:</div> <p>The avatars are stored in base64 encoding in openldap</p></div> <p>Looking at ejabberd source code, when the file mod_vcard_ldap.erl is preparing the vcard to send to the client, it runs this:</p> <pre> ldap_attribute_to_vcard(vCard, {"photo", Value}) -&gt; {xmlelement,"PHOTO",[],[ {xmlelement,"BINVAL",[],[{xmlcdata, jlib:encode_base64(Value)}]}]}; </pre><p>It seems that ejabberd reencodes again the image.</p> <p>You can try this modification:</p> <pre> ldap_attribute_to_vcard(vCard, {"photo", Value}) -&gt; {xmlelement,"PHOTO",[],[ {xmlelement,"BINVAL",[],[{xmlcdata, Value}]}]}; </pre> Mon, 24 Mar 2008 12:08:20 +0000 mfoss comment 52047 at https://www.ejabberd.im Its me again, but logged in https://www.ejabberd.im/node/2920#comment-52044 <p>Its me again, but logged in this time.</p> <p>The avatars are stored in base64 encoding in openldap, and not through a link to a file on the hard drive, could it be why there is a problem ?</p> Mon, 24 Mar 2008 02:29:17 +0000 vetetix comment 52044 at https://www.ejabberd.im