powered by Jive Software

HTTP File Upload not working on localhost

Hi,

I have cloned the source of Openfire, and I have set up the server. The name of the server is x556uf (my laptop) Now, I have installed the plugin called HTTP File Upload from the Available Plugins page.

Now I have two phones with the Conversations.im XMPP Client installed. I have logged in to 2 accounts from both the phones. Now, whenever I try to send multimedia in a 1-1 chat or a group chat, I am unable to send them. When I click on Show Error Message, it says unable to resolve host ‘x556uf’ : No address associated with hostname.

Please help,
Thanks.

Not exactly localhost as you a not running Openfire on these phones you run clients on. It would have worked on localhost (works for me, when i run Openfire and Spark on the same Windows PC).

You need to have your server’s domain resolvable for your clients. As HTTP File Upload puts a link to a file based on your server’s domain name, e.g. https://xmpp.igniterealtime.org:7483/httpfileupload/38e93c79-c24e-4307-af6b-6e25f2387944/Lighthouse.jpg

Btw, how exactly have you logged in in Conversations client? Did you put user1@x556uf as login or something else?

Yes, both the phones, user1@x556uf , user2@x556uf , and when I enable advanced settings option, I put my laptop IP address there. And then when I’m trying to upload multimedia from either of these, it says error that ‘unable to resolve host ‘x556uf’ : No address associated with hostname’. Where am I going wrong?

So, your server’s domain name is not resolvalble (no DNS or other way to translate what ip stands behind x556uf) . You have workaround it in Conversations by putting IP in advanced settings. But i guess this only works for login server. When Conversations tries to access file upload link in the chat it uses regular dns api to resolve domain name and it fails.

Is there no way with which I can do file upload to 1-1 chat or group chat when my server is localhost on my laptop?

Well, i don’t know. If your clients were on Windows, you could edit hosts file and add your local domain there. Not sure if you can do this on Android.

My server is on a linux system. So theoretically, I should be able to edit my hosts file here too, right? What steps must I do?

The hosts file would have to be edited on the clients, not on the server.

Oh ok, thanks. So, if I get this server outside the localhost, and host it somewhere on the internet, with a proper URL, we should be able to use that plugin without having to modify anything, if I am not wrong.

Thats the way it is intended to work :slight_smile:

1 Like

Thanks again. I’ll post here again if something goes wrong.