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

Continue middleware chain after download. #143

Merged
merged 2 commits into from
Aug 17, 2016
Merged

Continue middleware chain after download. #143

merged 2 commits into from
Aug 17, 2016

Conversation

richardpringle
Copy link
Contributor

@richardpringle richardpringle commented Aug 16, 2016

connect to #59

@richardpringle
Copy link
Contributor Author

@loay, @raymondfeng: please review.

@@ -258,6 +258,9 @@ exports.download = function(provider, req, res, container, file, cb) {
reader.on('error', function(err) {
handleError(res, err);
});
reader.on('end', function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the same listener apply to line 247 too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed above

@bajtos
Copy link
Member

bajtos commented Aug 17, 2016

While this may be a good short-term fix, we should strongly consider rewriting the method to use the new strong-remoting type "file" instead. That will also fix the swagger description of the download method.

See strongloop/loopback#2063 (comment) and strongloop/strong-remoting#284 for more details.

@loay
Copy link
Contributor

loay commented Aug 17, 2016

LGTM

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

Successfully merging this pull request may close these issues.

4 participants