var link=document.createElement('a');
link.href = filePath;
link.download = filePath.substr(filePath.lastIndexOf('/') + 1);
link.click();
this is not working for chrome. in text file in view on same browser,.
i want automatically download in text file on download button..
plz help me..
thanks in advance..


Salman BegRank #284 · 8.8K reputationPosted May 26, 2020, 5:44 AM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted May 26, 2020, 8:27 PM EDT