How to get a blob out of archiverjs?
Hello,
Sorry if I'm misunderstanding things, I'm not usually working with web technologies. I should note that I'm working only client-side using typescript and webpack, no nodejs.
So I have a canvas on which I draw. I want to be able to record what's happening on the canvas at certain moments. I have tried using CCapture.js but for some reason it doesn't work with typescript&webpack and the author didn't bother to fix it. As a consequence my strategy is now to capture the images myself with this kind of pipeline:
- Capture several snapshots in form of
Blobs (with canvas.toBlob) - When I have enough of them, archive them together with archiverjs
- Save the archive to the user
Right now I believe I am able to create the archive but being on the client-side I don't know what to do next. I don't really know how to use WriteableStreams and it seems more difficult on the client-side than on nodejs as I can't simply write to the user's filesystem.
Is there a way to convert the archive to a Blob and then be able to save it locally? Is there another way if this isn't possible?
Thanks