editableTable and image upload


I'm using 2 entities : Product and ProductImage.

I used the editable table widget to display information of the product (including the image). This works fine, but when i would like to add a record, how can i upload an image into the new record field of the new product?
I imagine i have to use the upload widget, but i'm stuck from there. I select my image but it should update the new record with the new image and afterwards the product should be created with the uploaded image.

Can someone help me with this?