FileSaver.js
StreamSaver.js
FileSaver.js | StreamSaver.js | |
---|---|---|
17 | 6 | |
21,102 | 3,869 | |
- | - | |
0.0 | 4.7 | |
about 1 year ago | 6 months ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
FileSaver.js
- fileSaver.js failing in local html file
-
How to receive blob responses using Angular's 2+ @angular/http module?
var headers = new Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded'); this.http.post('http://localhost/a2/pdf.php', reportPost, { headers: headers }) .retry(3) // .map( (res:any) => res.blob() ) // errors out .subscribe( (dataReceived:any) => { var blob = new Blob([dataReceived._body], {type: 'application/pdf'}); saveAs(blob, "Report.pdf"); }, (err:any) => this.logError(err), () => console.log('Complete') ); ps. the saveAs function comes from here: https://github.com/eligrey/FileSaver.js
-
How to make a browser display a "save as dialog" so the user can save the file on his system? And it must work in all browsers, Mac, and Windows Os, how can we do it in angular? and how can we give default file name and type also
You could check out this library to see how it’s done or just use the library itself: Blog on FileSaver.js
-
Exporting CSV File (spreadsheet) with JavaScript
As a result, I had to go to the github page for FileSaver.js (https://github.com/eligrey/FileSaver.js), copy the “FileSaver.js” file in the “dist” folder and paste it into a new file in the same directory as my code. The FileSaver.js is then imported using a “script src=” tag on line 6, as seen below
-
How To Create a Certificate Generator Website in JavaScript
Goto link https://github.com/eligrey/FileSaver.js After opening the link, go to the dist. folder and download FileSaver.js file
- Screenshot with WEB Canvas, Blob, ZIP
-
JSpdf working in Internet Explorer but not working in Chrome
By following some post :get_URL().createObjectURL error I was able understand that:
-
How do I download a file with Angular2 or greater
The code of the component function is below. I've tried different alternatives, the blob way should be the way to go as far as I understood, but there is no function createObjectURL in URL. I can't even find the definition of URL in window, but apparently it exists. If I use the FileSaver.js module I get the same error. So I guess this is something that changed recently or is not yet implemented. How can I trigger the file save in A2?
-
Best way to save and load local files?
I tested a file-saver.js, but it can only save, not load files, and it can't save in the background, it has to prompt the user to save the file somewhere.
-
How can I create a dynamic file and then have user download it on a web app?
If it's a relatively small amount of data (like 100mb or less), try https://github.com/eligrey/FileSaver.js it handles all the edge cases nicely.
StreamSaver.js
-
It's never been a better time to switch to Firefox
This! It is frustrating that web apps like draw.io can't save to file directly using Firefox. It gets old having to save a new file every time you make a change.
Beyond that, the File System API would also allow for streamed downloads directly from the web-app. This would allow for web-apps to generate large download files without having to store a copy on a database (external server or IndexedDB), which is a privacy improvement. The only way to do this now is by using convoluted techniques to essentially do a MITM to a fake endpoint [1].
[1] https://github.com/jimmywarting/StreamSaver.js
-
UnCloud project: WebRTC chat, file transfer, and remote observation
Yuck, that sounds annoying. I'm on Linux and generally use Firefox, so I haven't run into that yet. I'm using https://github.com/jimmywarting/StreamSaver.js for saving data to disk, and it seems that a similar issue may be present for that project as well.
- How to dowload huge files
-
How can I create a dynamic file and then have user download it on a web app?
If it's larger, it's complicated... https://github.com/jimmywarting/StreamSaver.js generally works, but is not 100% reliable. https://github.com/jimmywarting/native-file-system-adapter is supposed to be like a newer version of it, but I struggled to get it working. You can also use https://web.dev/file-system-access/ but it's only supported in Chrome.
-
Help beta test a new feature - import/export leagues with no size limit
The hacky new way. There is a library which lets other browsers stream data to a file. Problem is, it's a bit unreliable. In my testing, I found it sometimes doesn't work in Firefox (reload usually fixes it) and it didn't work at all in mobile Chrome (not sure why yet).
-
Speer - a peer to peer communication app
Thank you for the kind words! Firefox is not fully supported, because of two things: - no support for WritableStream (used for downloading the files). Read more here - not supporting system audio capture at all Non of this is breaking though, and file downloading still works, but it might be a little slower.
What are some alternatives?
jsPDF - Client-side JavaScript PDF generation for everyone.
native-file-system-adapter - File system, based on the spec reference implementation
JSZip - Create, read and edit .zip files with Javascript
Surfable-app - Install any website as an app for instant access 🖥️
image-occlusion-in-browser - Create image occlusion in browser
speer - Speer is a fast, privacy focused and open source communication app for various use cases
genanki-js - A JavaScript implementation for generating Anki decks in browser client side
trystero - 🤝 Build instant multiplayer webapps, no server required — Magic WebRTC matchmaking over BitTorrent, Nostr, MQTT, IPFS, and Firebase
mkanki - Generate Anki decks. Supports cloze models and adding media.
unit-test-service-worker - Writing unit tests for service workers made easy.
sql.js - A javascript library to run SQLite on the web.