I've been looking about for a while now and I cant find a proper answer.
Basically I have a web page that lets the user enter somevalues and download a specific file depending on the values entered. All is working but, I want to enable the user to select where to save the file to, instead of just the browser saving to the default download location.
I am using the follownig to initiate the download.
/**
* Get URL for data file and ensure user wants to download it
**/
function getResultDataHandler(result, messages) {
var dataURL = result.value.url;
var r = confirm("Save File?");
if (r == true) {
download(dataURL);
}
else {
console.log("Canceled");
}
showMessage("", true);
}
/**
* Open the download dialog
**/
function download(dataURL) {
console.log("downloading");
window.open(dataURL, 'Download');
}