Thanks a lot, I'll use DataForm inside <file /> to send my custom fields.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Saint-Andre Sent: miércoles, 05 de marzo de 2008 04:21 p.m. To: Jabber/XMPP software development list Subject: Re: [jdev] File Transfer and custom attributes Matías Rojas wrote: > Hi, > > Im using Stream Initiation (XEP-0095) and File Transfer (XEP-0096) to send > a file, but I need to include additional information about the file Im > sending. I'm curious: what information do you want to include? If it is of general interest, perhaps we should update XEP-0096 to include it. > What is the best way to send custom attributes of a file? > > Should I use DataForm? Sure, that might work... <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.txt' size='1022'> <x xmlns='jabber:x:data' type='result'> <field var='FORM_TYPE' type='hidden'> <value>your-private-namespace-here</value> </field> <field var='your-first-private-field'> <value>a-value</value> </field> <field var='your-second-private-field'> <value>a-value</value> </field> </x> </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>
