Previous: Receiving files, Up: File transfer


5.2 Sending files

To send a file to someone, you need an XEP-0065 proxy.1 If your Jabber server hosts such a proxy, it will be found automatically, otherwise it needs to be manually configured.

You can check whether your Jabber server has a proxy with M-x jabber-get-disco-items; see Service discovery.

To configure a proxy manually, customize the variable jabber-socks5-proxies. Putting proxy.jabber.se there should work. Type M-x jabber-socks5-query-all-proxies to see if the proxies answer.

Now, you can type M-x jabber-ft-send to send a file to someone. You need to enter the correct full JID, including resource, to get this right. If the contact is logged in with only one client, and you can see it online, just typing the JID or roster name is enough. If you run the command from a chat buffer, the JID of the contact is given as the default value.

If the contact has several clients online, you probably want to send the file to a particular one. If you run this command from within a chat buffer, the default target will be the one that last sent a message to you. If you just type a bare JID or a roster name, the client with the highest priority will get the file.

If the contact accepts the file, and the contact's client succeeds in connecting to the proxy, jabber.el will send the file through the proxy. During this time, your Emacs will be blocked, so you might want to avoid sending large files over slow connections.


Footnotes

[1] This requirement is not inherent in the protocol, only in the current file transfer implementation of jabber.el, and in Emacs versions earlier than 22.