Complex type contract

I am using the upload widget in UI designer to upload a photo and save it to a document that I have previously defined. I've made a complex contract that contains a child "upload" of type File. When I run the workflow instance, I get the following error: