I'm using some module with koa and they only have this documentation which is written in koa v1 not v2. and since I've never used v1 before, I have no idea how to write this in v2.
app
.use(body({
IncomingForm: form
}))
.use(function * () {
console.log(this.body.user) // => test
console.log(this.request.files) // or `this.body.files`
console.log(this.body.files.foo.name) // => README.md
console.log(this.body.files.foo.path) // => full filepath to where is uploaded
})