Koa-body file upload ctx.request.files is undefined

upload the file according to a koa2 written in the online tutorial and install the koa-body. Postman is used for testing, but an error is reported. The console shows that ctx.request.body.files is undefined
clipboard.png

clipboard.png

clipboard.png

ctx.request.body{}
ctx.request

clipboard.png

.
Feb.25,2022

has solved the problem of
app.use (koaBody ());
replacing
app.use (koaBody ({multipart:true}));
with


, but I app.use (koaBody ({multipart:true})); is still not good, ask God for advice

Menu