We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is my form:
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <form action="/" method="post" enctype="multipart/form-data"> <input type="file" name="img" id="img"> <input type="hidden" name="_token" value="{{ csrfToken }}"> <input type="submit" value="Submit"> </form> </body> </html>
and this is my route.js
Route.get('/', function(req, res) { res.view('index', { csrfToken: req.csrfToken() }); }); Route.post('/', { uses: function(req, res) { res.send(req.input.all()); }});
But, when I submit the form, the json output is {}
Can you help me?
The text was updated successfully, but these errors were encountered:
Have you added any middleware to parse multipart requests.
Quorra is configured with bodyparser middleware by default which allows to parse four types of request data: JSON, url-encoded, text and raw.
If you want to parse multipart form data you have to add a multipart middleware like multer or busyboy.
Here is the documentation on adding custom middleware to you Quorra application: https://quorrajs.org/docs/1.0.0/getting-started/middleware.html#custom-middleware
PS: Please use our gitter chat room for discussions. Github issues are specifically for registering bugs and requesting features.
Sorry, something went wrong.
FYI Handling file uploads with QuorraJS
Thank you ! 😄
No branches or pull requests
This is my form:
and this is my route.js
But, when I submit the form, the json output is {}
![captura de tela de 2017-07-21 02-04-00](https://user-images.githubusercontent.com/8161163/28449779-16318ffa-6db9-11e7-9dc6-e6486ef722b3.png)
Can you help me?
The text was updated successfully, but these errors were encountered: