Open vhpoet opened 7 years ago
actually even router.post('/profilepic', body(), this.changeProfilePicture)
doesn't work, with or wihtout app.use(body())
.
Hmm.. strange, don't know. Can you please try koa-better-router? It's almost the same (and even more better) and is guaranteed to work with this version of koa-better-body
.
It was working, probably some new versions of koa-router
do something, i don't following it.
you don't have to disable multipart because this module doesn't provide ctx.request.fields
only when the request is multipart/form-data. so you could just parse body without handling multipart
I'm on
koa@2.2.0
,koa-router@7.2.0
andkoa-better-body@3.0.2
.Trying to disable multipart for all the routes except
/profilepic
.with this code
changeProfilePicture
is never called. It works if I remove thebody()
from the router and usemultipart: true
onapp.use
.