eligrey / eligrey/FileSaver.js
Save file without a filename, only the extension
- Dominant language
- JavaScript
- Stars
- 22k
- Forks
- 4.3k
- PR merge metrics
- No merged PRs in 30d
Description
**Expected behavior**
When generating a file, with just the file extension defined as the filename I'd expect a file being prompted for downloading with just the extension as the filename. For example `.env` should prompt for a file to download called `.env`
**Current behavior**
````javascript
var file = new File(["Hello, world!"], ".env", {type: "text/plain;charset=utf-8"});
FileSaver.saveAs(file);
// prompts for file called "env.txt"
var file = new File(["Hello, world!"], ".env", {type: "application/x-envoy;charset=utf-8"});
FileSaver.saveAs(file);
// prompts for file called "env"
````
**Question**
Maybe it is simply not possible, or maybe it is a bug. Any comments are appreciated.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.