We have released recently in ejabberd-modules Subversion repository a new contribution called mod_http_fileserver.
This module is a good example of how the new HTTP plugin API. It can serve as a good illustration of what can be achieved by developers using this API.
To try this new module:
- be carefull: The whole thing is still in beta.
- download and compile ejabberd development version from SVN as usual:
https://svn.process-one.net/ejabberd/trunk/
- download and compile mod_http_fileserver module from SVN:
https://svn.process-one.net/ejabberd-modules/mod_http_fileserver/trunk
Once you have done that, you can add the new module to your configuration file.
Here is a sample ejabberd.cfg options, assuming that files are to be accessed
under ”http://server:5280/pub/archive/” and that the filesystem directory to export is ”/var/www”:
{listen,
...
{5280, ejabberd_http, [http_poll, web_admin,
{request_handlers, [{["pub", "archive"], mod_http_fileserver}]}]}
...
]}
...
{modules,
[
...
{mod_http_fileserver, [{docroot, "/var/www"}]},
...
]}
The code is the work of Massimiliano Mirra.
Your feedback is welcome !
