-
Notifications
You must be signed in to change notification settings - Fork 155
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
Got stuck when uploading a file #9
Comments
Can u remove the bodyParser? It adds a middleware to handle multipart/form-data. Loopback rest is good. Sent from my iPhone 5
|
@raymondfeng |
No. loopback.rest middleware already handles json and form encoded media types. Sent from my iPhone 5
|
Yeah, it works, thank you~~~ |
I think when I remove the bodyParser, the upload works fine but then the user/login does not work and it returns
If I add back the bodyParser then the login works well but upload fails just as before. So, I believe there is a bug either in loopback-storage-service or in loopback itself about it. |
As a workaround for now, you can change https://gist.github.com/chocstarfish/10224682#file-gistfile1-js-L45 to be: app.use(loopback.json()); We'll investigate further. |
@raymondfeng |
i having the same issue always pending after submit. In what specific file did you remove the bodyParser from? is it in the passport? |
I added storage service feature to my app like this https://gist.github.com/chocstarfish/10224682,
and used the example code in here https://github.com/strongloop/loopback-storage-service/tree/master/example to test it.
The problem is when I upload a file, the request is always pending and after a while it throws an error like this:
and the back-end also logs an error:
I think I am using the latest npm packages, then what is the problem?
The text was updated successfully, but these errors were encountered: