Using System.File or System.Image in a JS action

Does anyone have any experience using System.File or System.Image in a Javascript action? I have a JS library that allows me to save certain DOM elements and their CSS styles as a .png image, which I would like to save as an image to use later. However I’m not sure how to save the .png image as a System.Image object in Mendix. Does anyone know how to do this?​​​​​​
1 answers

For anyone trying to figure out how to do this, you can use the Client API:

The specific function I was looking for is:, fileName, params, blob, callback, error)

The way I used it is by supplying the JavaScript action I was making with an object that was a Generalization of System.Image and creating a Blob ( of the image in the action, both of which I use in the function.