Olivier Goffart wrote:
Le vendredi 21 décembre 2007, Detlev Casanova a écrit :
Hi all,
I would like to know if there is a way to send a preview of a file (in most
cases, images) through the first stanza for the stream initiation.

Something like
<iq type='set' id='offer1' to='[EMAIL PROTECTED]/resource'>
  <si xmlns='http://jabber.org/protocol/si'
      id='a0'
      mime-type='text/plain'
      profile='http://jabber.org/protocol/si/profile/file-transfer'>
    <file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
          name='test.png'
          size='1022'>
    <preview>[Binary data]</preview>
    </file>
    <feature xmlns='http://jabber.org/protocol/feature-neg'>
      <x xmlns='jabber:x:data' type='form'>
        <field var='stream-method' type='list-single'>
<option><value>http://jabber.org/protocol/bytestreams</value></option>
<option><value>http://jabber.org/protocol/ibb</value></option> </field>
      </x>
    </feature>
  </si>
</iq>

This way, a preview of the file can be shown when the user is asked for the
transfer.

In Kopete we use exactly this :

http://www.xmpp.org/extensions/inbox/file-preview.html

But it has not been approuved as a XEP because the base 64 data may be too large.

For me anyway this is not larger that the one in the vcard, and is a simple way to do this, considered the fact that alternatives doesn't exist in practice yet.

Given the recent discussions about binary data etc., maybe it is time to revisit publishing that proposal as a XEP.

/psa

Reply via email to