Answer the question
In order to leave comments, you need to log in
How to send a request and wait for the "Download" event in nodejs?
There is a site that fills out forms using a get request, and then html2canvas turns it roughly into a photo and automatically downloads
html2canvas(document.querySelector("#capture")).then(canvas => {
document.body.appendChild(canvas);
let img = canvas.toDataURL("image/png");
document.write('<img src="'+img+'"/> <p><a href="'+img+'" id="file" download>Скачать файл</a>');
file.click()
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question