eligrey / FileSaver.js

An HTML5 saveAs() FileSaver implementation
https://eligrey.com/blog/saving-generated-files-on-the-client-side/
Other
21.42k stars 4.38k forks source link

how to use FileSaver in html,cannot use NPM to import #740

Open skyworthli opened 2 years ago

skyworthli commented 2 years ago

already input

error: ReferenceError: FileSaver is not defined

ciurtetudorcatalin commented 2 years ago

Write this into your html page <script src="https://unpkg.com/file-saver/dist/FileSaver.min.js"></script> and you're done. you can use saveAs as usual