Web XMPP clients get error 400 when sending pictures

Hello:

We are trying to deploy any web client so as to allow our users send images like in watsapp or telegram or whatever but internally. I tried so far XMPP Web and ConverseJS. Both exchange text messages great but stumble when I send a picture. In the console, I get error 400 for HTTP upload.

Here’s what I checked:

  • Firewall on the sending and receiving machines allows TCP port 7443 to the Open Fire server for the browser EXE.
  • Web binding is enabled in the admin - server settings on port 7443
  • Script syntax is enabled
  • Support for CORS is enabled
  • Both machines can browse to https://xmpp.mydomain.local:7443/http-bind/
  • The web clients are pointed at that address.

The request that errors from the browser console is:
PUT https://xmpp.mydomain.local:7443/httpfileupload/wHMkwAsvrglkMg_8lbRMUt-MyAU/my_test_file.jpg

I browsed your discourse here and saw Http-bind does not work, 400 BAD REQUEST but I am not trying to do any programming, only deploying the ready-made softwares.
Also saw a post re self-signed cert, but we do not have a self-signed cert. Our cert is trusted and covers the FQDN of the server, otherwise nothing in the web clients would have worked - been there done that.

Any tips on how this error 400 can be troubleshot and fixed?

Did you install the openfire httpfileupload plugin?
if so, go to its page on the admin console and check if there is a directory configured there.

I did.

The problem seemed to be in the Clamav integration, which I found from the log entries to that effect. Sysadmin forgot to open port 3310 to its host.

Now it’s open, and everything works fine.

i am not sure on how Clamav integration works, but if you are not integrating it, i recommend you to close the port 3310 and set the property plugin.httpfileupload.clamavEnabled to false