How to include file attachment in ajax submission via the rest_api?
When submitting a form via jQuery and using admin-ajax, including a file attachment was easy:
var data = new FormData($(this));
This submits all the form fields, except the file attachment.
var data = $this.serializeArray();
How do you include a file attachment with the rest_api approach?