Formidable middleware for Koa, version 1.1.0. Parses multipart/form-data (file uploads) and urlencoded bodies, adding `body` and `files` to `ctx.request`. Supports both automatic middleware and manual parsing via `formidable.parse(opts, ctx)`. Low maintenance, primarily for older Koa (generator-based) but works with Koa v2 when wrapped in `koa-convert`. Last updated in 2015; consider modern alternatives like `koa-body` or `@koa/multer`.
npm install koa-formidableNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal Koa app that parses form data and logs body and files.
Access body and files via `this.request.body` and `this.request.files`, not `this.req.body`.
Consider using koa-body, @koa/multer, or koa2-formidable for Koa v2.
Use koa-convert: app.use(convert(formidable())).
Use co or koa-convert to handle the generator. Alternatively, use util.promisify.
Check the version of formidable installed; if needed, pin formidable version in package.json.
Ensure app.use(formidable()) is called before any route that accesses body/files.
Use generators: `app.use(function*() { ... })` OR wrap with `co.wrap` or `koa-convert`.Use `const formidable = require('koa-formidable')` (CommonJS). Do not use ES6 import.