FileSaver.js icon indicating copy to clipboard operation
FileSaver.js copied to clipboard

Downloading a file without a name, just extension, i.e ".env"

Open AdnaneSaber opened this issue 3 years ago • 1 comments

var blob = new Blob(["REACT_APP_DNS=example.com"], {type: "text/plain;charset=utf-8"}); 
saveAs(blob, ".env");

This code creates a file "env.txt", and if you add a space before the dot like this " .env" it created this file "_.env" I checked stackoverflow about it there is nothing, refering to this case, but an unanswered question. Is there anyway to download a ".env" file using FileSaver.js ?

AdnaneSaber avatar Jan 24 '22 08:01 AdnaneSaber

Did you find a solution to this?

SahilAggarwal2004 avatar Oct 29 '22 13:10 SahilAggarwal2004