How to instantiate a File object in JavaScript?
According to the W3C File API specification, the File constructor requires 2 (or 3) parameters. So to create a empty file do: The first argument is the data provided as an array of lines of text; The second argument is the filename ; The third argument looks like:var f = new File([“”], “filename.txt”, {type: “text/plain”, … Read more