copy file to NAV server

Hi Technical Experts,

I want to save scanned documents against some transactions say Sales Invoice copies.

I am trying to save the pdf files, in RTC as the logic runs @ server, i need to save this file at the server.

I am using uploadinstream command to achieve this, but i am struggling. Tried to read articles on the web but could not get the result.

I need help from someone who has already this.

Thanks

John