In express 4.1.3 I try to process a POST request from a form with the parameter enctype='multipart/form-data'
. For processing I used various modules of the type (multer, connec-busboy), but I could not understand how to use them.
Tell me the best way to upload files in express 4?
Here is a link to a bitbucket where you can see the code.
when the node bin/wwww
is launched, an exception is node bin/wwww
to the console and the server crashes.
throw new TypeError('app.use() requires middleware functions'); ^ TypeError: app.use() requires middleware functions
I’ve registered only one setting for the multar when I’m cleaning the server again.
app.use(multer({ dest:'./public/upload' }));