Go to file
2015-07-22 02:03:29 -05:00
contrib Create ejabberd_cfg_snippet.yml 2015-07-22 02:03:29 -05:00
plugins Add gitignore 2015-07-04 13:49:04 -05:00
__init__.py Add Python 2 support 2015-07-04 13:28:52 -05:00
.gitignore Add gitignore 2015-07-04 13:49:04 -05:00
config.yml inital commit 2015-06-28 11:21:30 +02:00
README.md edited readme 2015-07-20 18:21:16 +02:00
requirements.txt Add Python 2 support 2015-07-04 13:28:52 -05:00
server.py Make configfile and logfile configurable via commandline options 2015-07-18 14:04:17 +02:00

HttpUploadComponent

The HttpUploadComponent is a plugin extension to your XMPP server that allows users to upload files to a HTTP host and eventually share the link to those files. It runs as a stand alone process on the same host as your XMPP server and connects to that server using the Jabber Component Protocol.

A detailed introduction into the necessity of such a component and the simple protocol can be found on the XMPP Standards email list.

###Configuration Configuration happens in config.yml and is pretty straight forward.

jid and secret have to match the corresponding entries in your XMPP server config (Refer to the documentation of your server).

whitelist should contain a list of domains whos JIDs are allowed to upload files. Remove the entry if you want to allow everyone (not really recommended).

get_url and put_url are prefixes to the URLs. The put_url is usually a combination of your hostname and the port (Port can be ommited if HTTP default ports are being used) The GET URL can use a different host if you want to serve files using a standard nginx or another HTTP server that might be more suitable for serving files than a python script.

For security purposes you should put the python script behind an HTTPS proxy or stunnel (remember to adapt the URLs). For quicker results you can also use the build in TLS encryption by setting the keyfile and certfile in the config file.

###Run Running the component is as easy as invoking python server.py

Some (unoffical) init scripts can be found in the contrib directory.

Feel free to write your own init scripts if necessary and contribute them back by creating a pull request.

###Clients Currently the only client with build in support is Conversations where it is being used to send files to Multi User Conferences and to multiple resources in 1 on 1 chats.