[Standards] Image preview in file transfer (XEP-0096)

Detlev Casanova detlev.casanova at gmail.com
Fri Dec 21 10:29:08 CST 2007


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='receiver at jabber.org/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 advance, thanks.

Detlev.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.jabber.org/pipermail/standards/attachments/20071221/75414ca0/attachment-0001.pgp 


More information about the Standards mailing list