'React js download several files with custom names

I need to download 3 different files after clicking on button "DOWNLOAD". I'm generating several files and put them into window.open().

window.open('data:text/csv;charset=utf-8,' + encodeURI(csvUs), '_blank');
window.open('data:text/csv;charset=utf-8,' + encodeURI(csvInter), '_blank');
window.open('data:text/csv;charset=utf-8,' + encodeURI(csvWithout), '_blank');

There is a problem, all files with the same name. Is it possible to change name?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source