I'm using Unity 3D on the client so it's rather more opaque than that I'm afraid. For what it's worth the Unity code looks like this:
WWWForm form = new WWWForm();
print("form created ");
form.AddField("action", "generator upload");
form.AddField("file","file");
form.AddBinaryData ( "file"...