SyntaxFix
Write A Post
Hire A Developer
Questions
Now it's possible and supported by all major browsers: https://developer.mozilla.org/en-US/docs/Web/API/File/File
var file = new File(["foo"], "foo.txt", { type: "text/plain", });