I have tried prosody and ejabberd, none of them naturally support this by default.
You need plugins.
And today i found this: https://xmpp.org/extensions/xep-0363.html
https://modules.prosody.im/mod_http_upload.html I will try them
- Checkout(download) code from https://github.com/siacs/HttpUploadComponent
- Go to the subfolder: /HttpUploadComponent/httpupload
- Make sure you have python3 by run: python3 -V
- sudo apt-get install python3-pip
- pip3 install pyyaml
- pip3 install sleekxmpp
- Copy HttpUploadComponent/config.example.yml to /httpupload and change it to config.yml
- run python3 server.py
You will see the output like this. which means something is wrong , we need to change the settings.
But actually you can get lot clue from this log, the python program try to connect to your xmpp server, it get response but looks like the server is refused the connect.
Let's do some settings change to enable the connect:
On above image, you can see I am on the openfire admin settings page, and go to "server settings" - > external components. the default port is 5275. this is the port open for other components to connect to, so we should change our python program to use this port.
Second, we should enable a subdomain, which is will decided your component jid. what i created was "upload". So my component jid is upload.ebt. because my domain is "ebt" which is set in my openfire. I also created a secret with it, which is "aaa".
Above file is the config.yaml file of the python program. as we described for the previous picture. I did changes accordingly.
One thing i didn't mention before is the http_address, this is your server's ip address. If your server have a c name or DNS name, then use it instead of the ip address. (the ip address in whitelist is not useful, you can delete it.)
Note, you can always run your xmpp and this python program in different computers. Then you need to change the server.py file line 115, change "localhost" to your xmpp server's ip address.
Above picture just put settings together to show which maps/links to which.
Finally you should be able to get above log after you restart you python program.
Try you xmpp client, then you should be able to share files in a group (MUC). Remember to logout and relogin again to re-request the server to update it's capability.