Hey there,
You should be able to use fileUpdate to add/remove existing files to/from products.
In you case, you can call fileUpdate for an existing media and include product id in referencesToAdd to reference the given media to that product.
Update your app to use the new files model is also a good read for understanding the new files model in GQL and how it works with products.
Thank you and please let us know if you have any further questions/concerns.
-Gurpreet