powered by Jive Software

How to send http_uploaded images

Hi, I am running Smack version: 4.3.0-alpha1-SNAPSHOT (4.2.0-82-gf5ef42ec-master 2017-06-02) against a prosody 0.9 server. I can connect/login and send plain text messages with/without OMEMO. I also can upload images via http_upload (HttpFileUploadManager). The result of the upload is the URL of the image.

Now I can place the URL into the message and send it to the receiver. But this way the receiver only gets the link he can press. I actually want the image to be displayed on the other side directly.

I have no idea how to manage this.

You want to use https://xmpp.org/extensions/xep-0066.html

Unfortunately Smack has not built in support for it. But it is easy to add. Patches welcome :slight_smile:

1 Like

Oh cool! Thanks for the point! I have read the spec - that make sense to me now.

But (there is always a but) - how to manage this with omemo? This seems to be different, isn´t it?

I don’t think this is already a XEP for OMEMO encrypted HTTP File upload. You can take a look at how conversations does it though: https://github.com/iNPUTmice/ImageDownloader


Great! Got everything working. Plain and omemo with images. Thanks a lot for your time!

1 Like

Curious how you managed to make the image displayed on the other side and not only URLs . Did you implement https://xmpp.org/extensions/xep-0066.html ?