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..