eligrey / FileSaver.js

An HTML5 saveAs() FileSaver implementation
https://eligrey.com/blog/saving-generated-files-on-the-client-side/
Other
21.42k stars 4.38k forks source link

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

Open AdnaneSaber opened 2 years ago

AdnaneSaber commented 2 years ago
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 ?

SahilAggarwal2004 commented 1 year ago

Did you find a solution to this?