Merge pull request #13 from SamWhited/readme_cleanup

Cleanup readme
This commit is contained in:
Daniel Gultsch 2015-07-23 10:00:59 +02:00
commit 16cd830cc5

View File

@ -1,30 +1,52 @@
# HttpUploadComponent # 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](http://xmpp.org/extensions/xep-0114.html).
A detailed introduction into the necessity of such a component and the simple protocol can be found on the [XMPP Standards email list](http://mail.jabber.org/pipermail/standards/2015-June/029969.html). 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.
###Configuration It runs as a stand alone process on the same host as your XMPP server and
Configuration happens in config.yml and is pretty straight forward. connects to that server using the [Jabber Component
Protocol](http://xmpp.org/extensions/xep-0114.html).
```jid``` and ```secret``` have to match the corresponding entries in your XMPP server config (Refer to the documentation of your server). A detailed introduction into the necessity of such a component and the simple
protocol can be found on the [XMPP Standards email
list](http://mail.jabber.org/pipermail/standards/2015-June/029969.html).
```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). ### Configuration
```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. Configuration happens in `config.yml` and is pretty straight forward.
For security purposes you should put the python script behind an HTTPS proxy or stunnel (remember to adapt the URLs). ```jid``` and ```secret``` have to match the corresponding entries in your XMPP
For quicker results you can also use the build in TLS encryption by setting the ```keyfile``` and ```certfile``` in the config file. 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).
For the configuration on the XMPP server side have a look into the contrib directory or check the server documentation. ```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
built in TLS encryption by setting ```keyfile``` and ```certfile``` in the
config file.
For the configuration of the XMPP server side have a look into the contrib
directory or check the server documentation.
### Run
###Run
Running the component is as easy as invoking ```python server.py``` Running the component is as easy as invoking ```python server.py```
Some (unoffical) init scripts can be found in the contrib directory. 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.
Feel free to write your own init scripts if necessary and contribute them back by creating a pull request. ### Clients
###Clients Currently the only client with build in support is
Currently the only client with build in support is [Conversations](http://conversations.im) where it is being used to send files to Multi User Conferences and to multiple resources in 1 on 1 chats. [Conversations](http://conversations.im) where it is being used to send files
to Multi User Conferences and to multiple resources in 1 on 1 chats.