Why not decouple the two? Send the file to get processed, plus a callback url to referentially transparent hosting?