js-file-download
StreamSaver.js
Our great sponsors
js-file-download | StreamSaver.js | |
---|---|---|
1 | 6 | |
902 | 3,852 | |
- | - | |
0.0 | 4.7 | |
over 1 year ago | 5 months ago | |
JavaScript | JavaScript | |
MIT License | 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.
js-file-download
-
How to dowload huge files
My ReactJS app hits a Rest backend (I'm using Axios). I wish to hit some endpoint that returns a huge CSV report generated on the fly, in streaming mode. I'm using the standard recipe of doing my GET with Axios ( responseType: 'blob') and then using js-file-download
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].
-
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?
native-file-system-adapter - File system, based on the spec reference implementation
Surfable-app - Install any website as an app for instant access 🖥️
speer - Speer is a fast, privacy focused and open source communication app for various use cases
FileSaver.js - An HTML5 saveAs() FileSaver implementation
trystero - 🤝 Build instant multiplayer webapps, no server required — Magic WebRTC matchmaking over BitTorrent, Nostr, MQTT, IPFS, and Firebase
unit-test-service-worker - Writing unit tests for service workers made easy.