This is my first time working with streams. I've been trying various configurations based on the examples here and elsewhere. My chunks come through in an object { chunk, done }, and require another call to the API for the next chunk. (note: it's coming through a Websocket, not fetch) I can't seem to quite nail down how to delay the download dialogue until I've received done: true from my API. Please help if you can.
Note: writer is created outside this function to avoid creating a new writer on every iteration. It looks like this:
This is my first time working with streams. I've been trying various configurations based on the examples here and elsewhere. My chunks come through in an object
{ chunk, done }
, and require another call to the API for the next chunk. (note: it's coming through a Websocket, notfetch
) I can't seem to quite nail down how to delay the download dialogue until I've receiveddone: true
from my API. Please help if you can.Note:
writer
is created outside this function to avoid creating a new writer on every iteration. It looks like this: