I am using this code to download a DataURL to a file
function downloadURI(uri, name) {
var link = document.createElement("a");
link.download = name;
link.href = uri;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
delete link;
}
downloadURI(data, "images/helloWorld.png");
but it tries to download to user storage. I want to download to server storage (For example download to "images/download.png" rather than prompt the user to download on their computer.
I tried to pass into PHP but the dataurl is too large for ajax to pass through.