-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending a callback to .end() stops upload #32
Comments
Good catch. This is because I'm using the |
Adding extra note for my own reference when I fix this: http://elegantcode.com/2013/10/14/detecting-the-end-of-a-rainbow-inside-a-writable-stream/ nodejs/node-v0.x-archive#7348 (comment) The recommended method would be to bind a function to the |
I had the same problem in my project using writable streams. Luckily @TomFrost has made a |
Awesome... Thanks for the suggestion. I should have a fix using |
Okay I have branch 1.1.0 now with a fix for this issue. You are welcome to try it out in advance. I need to test a bit more before publishing on NPM. |
Hey Nathan, nice update. One of the benefits of FlushWritable is that it delays the WriteStream's |
Nice critique. That makes a lot of sense, and I'll definitely make that change before releasing this. Right now you have to listen for the "uploaded" event to know when the upload has been committed on S3. |
If you have a
upload
object like in the documentation example, you can write some data like this:After that, you will receive a series of events, like
uploaded
to signal your upload is complete.It seems though that if you set a callback in the
.end()
method (as you would do with other streams to be signalled when the data has been flushed), 1. you get signalled immediately and 2. no further events are triggered and no data is uploaded. For example:This is a harshly confusing behavior, if node streams are not confusing enough by themselves.
The text was updated successfully, but these errors were encountered: