How can I create a dynamic file and then have user download it on a web app?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/reactjs

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Klotho - AWS Cloud-aware infrastructure-from-code toolbox [NEW]
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Sonar - Write Clean JavaScript Code. Always.
  • FileSaver.js

    An HTML5 saveAs() FileSaver implementation

    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

    StreamSaver writes stream to the filesystem directly asynchronous

    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.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • native-file-system-adapter

    File system, based on the spec reference implementation

    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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts