I am trying to dump a db directly to a file for download using streamsaver in the browser (I use React), however, it does not work and the error is "dest.on is not a function". I guess it is because I use web-stream ponyfill which does not have the on() method on the stream.
Currently, I am dumping the db to a string with memorystream, and then create a blob from the string and stream it to streamsaver's writableStream. I think as the db can be large, the memory needed to store the string will be significant.
So, do you guys know of a way/lib to dump a db to a file directly in a browser (where fs.createWriteStream is unavailable) without memorystream?
Hello,
I am trying to dump a db directly to a file for download using streamsaver in the browser (I use React), however, it does not work and the error is "dest.on is not a function". I guess it is because I use web-stream ponyfill which does not have the on() method on the stream.
Currently, I am dumping the db to a string with memorystream, and then create a blob from the string and stream it to streamsaver's writableStream. I think as the db can be large, the memory needed to store the string will be significant.
So, do you guys know of a way/lib to dump a db to a file directly in a browser (where fs.createWriteStream is unavailable) without memorystream?