Hi Aditya,
Some more details on the exact process will help look into the issue. I did some debugging in the system and yet not sure how SAP has designed the "upload document" functionality for IM. I was under the impression that the class "CL_EHFND_ATF_MANAGER" serves this utility; however debugger is not stopping at lo_ehfnd_atf_mngr->upload(); pity!