I have built a custom field plugin which fetches data from a third party API. Included in this data is an image that I would like to save to the page folder in ‘content’.
My field is setup as a Vue template and calls custom routes defined in the index.php of the plugin. Some of the text returned data is saved into fields on the page using JS methods in the Vue component. That all works. Now I want to create a new image in the page folder?
Is there an easy way to either (a) get at the $page object for the $page sending the request to the custom route, or (b) do I have to pass a value from the front-end Vue component with the page id to do that?