From 1144ac42bb762f40d6dd272ea8d6aa88f2cb8e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Tue, 7 Aug 2018 19:44:51 +0200 Subject: [PATCH] Add precaution note about file constructor closes #455 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 38dfc7b..323134e 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,12 @@ Note: The standard HTML5 `canvas.toBlob()` method is not available in all browse You can save a File constructor without specifying a filename. The File itself already contains a name, There is a hand full of ways to get a file -instance (from storage, file input, new constructor) +instance (from storage, file input, new constructor, clipboard event) But if you still want to change the name, then you can change it in the 2nd argument ```js +// Note: Ie and Edge don't support the new File constructor, +// so it's better to construct blobs and use saveAs(blob, filename) var file = new File(["Hello, world!"], "hello world.txt", {type: "text/plain;charset=utf-8"}); FileSaver.saveAs(file); ```