0👍
You should create a blob out of the image and then set the FormData:
saveImage(){
let data = new FormData();
domtoimage.toBlob(document.getElementById('my-node'))
.then(function (blob) {
data.append('data', blob);
axios.post(`<Someurl>`, data, {
headers: {
'Content-Type': 'multipart/form-data',
},
})
.then(res => {
console.log(res)
})
})
}
Source:stackexchange.com