+ 1
File downloading.
How i can download files?
2 Answers
+ 2
I think this function should work. If not, let me know. I'll troubleshoot the code in my PC
function download(code,filename){
let blb = new Blob([code],{
"type":"text/plain"
});
let bUrl = URL.createObjectURL(blb);
let hlink = document.createElement('a');
hlink.href = bUrl;
hlink.download = filename;
hlink.click();
}
0
I need made IDE in web