added file upload handling to rpc routing