I’m not a programmer, though Of course you can change only the Spark, so it will let you to upload the file to the MUC as a link, and then every other Spark client will know, if you press on a file link in MUC, it should initiate a simple file download. As i said, this can create a lot of traffic on the uploader side, as you would have to upload this file for every requester. I mean, if 100 users click on that file link, this file will be downloaded 100 times from you. If you dont bother about the traffic, you can go this way and modify only the client.
After a bit of rethinking, probably there is no big difference if you first upload the file on some server (e.g. Openfire, or some http, ftp or other central server). There still will be 100 downloads of that file and the traffic will be the same, but you will have to upload it only once, so your PC won’t be attacked by 100 requesters. This would be a server’ headache As i’m not a programmer, especially dont know much about java, so i dont know what to suggest here. Maybe it would be easier to use some web server for file upload. But Openfire already has file transfer proxy service, so maybe it is easier to use that, though IM server would be burdened by massive file transfers (depends on the server resources, network setup, your file sharing needs, etc.)
So i see it:
While being in MUC you press say “Share a file” in your modified Spark -> Spark sends the file to Openfire -> your custom code on a server intercepts such command and receives and temporary stores the file (you should think about removing the file after that, maybe after MUC closing, also you should think how and where to store the file, database is not the best place for that i think) -> then your Spark generates a meta-link say “PunksUndead uploaded the file QuarterReport.doc” in MUC -> participant clicks on that link in his modified Spark -> his Spark sends a request to Openfire -> Openfire starts a file transfer with that client -> participant’s Spark shows file saving dialog and then downloads the file.
There should be a lot more stuff behid that as there should be a lot of data exchange between client and server to find out who wants what. Also this meta-link should have some ID of the file, as there could be a lot of MUC rooms going simultaneosly and a lot of files shared at the same time.
Well, this looks like more and more tough stuff to me