I wonder is there a way to override save file dialogue, while saving file in javascript.
I have a file (html or text or image) that is saved in localstorage. I would like to download it, but to set its download name to whatever I need. Right now it works, but it defaults to download (name) and file type (all).
This is the code that allows me to selectively pick whatever I need from local storage, but as I described above I have issue with name. I can't use server for this, as this is standalone Backbone project.
var base64 = window.btoa(this.model.get("filecontent")),
fileDownLoadInformation;
fileDownLoadInformation = "<a href='data:application/octet-stream;base64," + base64 + "'" +
">Download</a>"
//All file type have these options
extraOptions = "<div>" + fileDownLoadInformation + "</div>";
//etc...