Uploading a file in Flex Protocol

I have a scenarios where I am uploading a .doc/.pdf file on a flex 3 based application. In normal web apps we give filepath, but there is no mention of file path at all. When I try to replay the same script I am getting "path Invalid" error. The request is being sent as an flex_amf_call. Even if I want to give filepath, the stuff inside the arguments is all XML and I am not able to figure out how to tinker with it.

I tried flex, web and also ftp as the path where it is uploaded is sftp.

Any help would be appreciated.