You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw that behavior and thought that the writeable stream saw gridfs-stream as the underlying system so then the finish event makes sense - but the data is not flushed to the gridstore at that moment like you said. I will try the workaround you provided.
See nodejs v0.10 documentation:
http://nodejs.org/docs/v0.10.36/api/stream.html#stream_event_finish
Currently when the 'finish' event is emitted, the data is not flushed to GridFS since the
_store.close()
has not finished yet.See nodejs/node-v0.x-archive#7348 for a discussion around 'finish' and 'close' events in such cases ('close' event is not normalized in the API, so it's not the right solution).
At the end of the thread there is a workaround: https://www.npmjs.com/package/flushwritable
The text was updated successfully, but these errors were encountered: