How to use filesaver.js

后端 未结 6 620
南方客
南方客 2020-12-03 07:16

In the latest filesaver documentation, an example is given for how to use filesaver.js in conjunction with blobbuilder.js:

var bb = new BlobBuilder();
bb.app         


        
6条回答
  •  情深已故
    2020-12-03 08:08

    wll it looks like I found the answer, although I havent tested it yet

    var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
    saveAs(blob, "hello world.txt");
    

    from this page https://github.com/eligrey/FileSaver.js

提交回复
热议问题