Skip to content
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

provide callback for writeStream #200

Merged
merged 3 commits into from
Mar 31, 2020
Merged

provide callback for writeStream #200

merged 3 commits into from
Mar 31, 2020

Conversation

h-bar
Copy link
Contributor

@h-bar h-bar commented Mar 23, 2020

Currently there's no way to see if the request sent by writeStream (for uploading a file) is finished or not. The writeStream.on("finish") event is fired before the request is complement since the request itself is synchronize. This change adds a callback option when creating writeStream so that the callback is executed when the request sent by the writeStream is finished sending data

@perry-mitchell
Copy link
Owner

@h-bar Thanks! I made some changes to improve the callback handling, as the response handler still needs to be fired.

@perry-mitchell perry-mitchell merged commit 55eff8a into perry-mitchell:master Mar 31, 2020
@h-bar
Copy link
Contributor Author

h-bar commented Apr 1, 2020

@perry-mitchell Thanks so much for your improvement. This is my first merge request on Github so I'm really glad you liked it!

@perry-mitchell
Copy link
Owner

Good work @h-bar - appreciate the MR. Please drop by again if you have more suggestions :) - This is now live in 3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants