powered by Jive Software

Web chat clients and picture sharing


From last couple of days, I’m looking to figure out a way to share pictures in one-to-one chat session using Strophe and OpenFire. I’m unable to reach any conclusion yet to how to address the requirements where both users say ‘A’ and ‘B’ are connected in one-to-one chat using web clients (based on Strophe), and user ‘A’ wants to share a picture with ‘B’. As user ‘A’ uploads the picture, its thumbnail appears in user ‘B’ client shared picture area in browser. Later, if user ‘A’ removes the shared file it gets removed as well from user’s ‘B’ window.

Possible implementation I was thinking of:

  1. User ‘A’ uploads the file to a location from where it’s downloadable say, http://www.mydomain.com/download/filename.
  2. Now, the real problem how to notify user ‘B’ about it. I was thinking of if it’s possible to address this using Pub-Sub and File and Repository sharing (XEP-0214) or there is any other better way?

What I’m unable to understand with Pub-Sub is that it works like a shared service for which user ‘B’ must have knowledge about sharing service in advance and can subscribe to it. Secondly, ‘A’ and ‘B’ chatting session is private and no other user should be allowed to download/view the files shared in ‘A’ and ‘B’ session.

Looking forward on how to address this properly.

– Thanks

still no reply for any suggestion .


as soon as the file was uploaded I would send a simple “chat” message from A to B which contains the link.

Pubsub is for 1-to-n messages similar to RSS. Maybe one can create temporary topics but I wonder whether you really want to do this.

A simple upload service which returns a random URL path (maybe within a cookie) which is valid for 30 days (similar to public file sharing services) may be fine. One could also add a REST interface to allow users to specify who can download them how often or long.


Thanks for your suggestion… This was the way I started to address on my own, but I just wanted to make sure if it was the right way.

Thanks again.