Mendix Client 8 --- How to save as a FileDocument

What I am trying to do is to take a screenshot of a div element and then save it as a file in the database. My code so far looks like this: based on the mendix 8 client docs   --→ I tried to create and commit an object but I don’t know how to put the image data inside it.    Also, My PrintScreenImageDocument is a FileDocument Entity   
1 answers

It may be worth looking at the source for the File Dropper widget in the Marketplace. This allows a React widget to upload images to a Mendix application, so you can hopefully find the logic on how do this in there, and then use that in your code.

Looking at the code, it looks like it’s using to do this after the object has first been created and it’s guid returned.

I hope this helps you find a working solution.