Saving an image uploaded on openfire

I have an openfire plugin where in I’m providing extended features to the openfire server.

I have an image in my desktop. I want to browse this image and save and display on openfire.

I want to know how exactly to upload and save an image on the server… Uploading of image is happening but the uploaded image is not saving in any local folder.

I have tried to follow uploading and saving of images in tomcat and it works fine. Not sure of the process for openfire.

Can anyone throw some light on this?