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

request.file method #3656

Closed
dangreen opened this issue Mar 14, 2016 · 3 comments
Closed

request.file method #3656

dangreen opened this issue Mar 14, 2016 · 3 comments

Comments

@dangreen
Copy link
Contributor

Sails version: 0.12.1
Node version: 5.7.1
NPM version: 3.6.0
Operating system: OS X 10.10


https://github.com/balderdashy/sails/blob/master/lib/router/req.js#L125

  1. res is undefined
    2) why res.send(500, 'Streaming file uploads via req.file() are only available over HTTP with Skipper.') ? Where skipper? i mean console.log(request.file + "") prints function(){res.send(500... i do if (request.file) in my code, now request.file is always exist.
@Nishchit14
Copy link

@dangreen
Need more description

@dangreen
Copy link
Contributor Author

@Nishchit14 in request.file method res variable is undefined.
https://github.com/balderdashy/sails/blob/master/lib/router/req.js#L125

@mikermcneil
Copy link
Member

https://github.com/balderdashy/sails/blob/master/lib/router/req.js#L125

@dangreen thanks for the report! We'll take care of it in the next patch release. We added that stub method to help make it clearer that req.file() is specific to the default setup and skipper when working on the body parser, but clearly forgot to put res in place.

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

No branches or pull requests

3 participants