npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

koa-body-clean

1.0.0 • Public • Published

koa-body-clean

node npm tests codecov deps ddeps standard

Koa middleware for auto cleanup files created to disk by:

The middleware will automatically remove any file in temporary location upon response end, throws or close.

Please report any issues!

Installation

Requires:

  • node >= 7.6.x
  • koa >= 2
$ npm install koa-body-clean

Usage

const bodyClean = require('koa-body-clean')

Example

const body = require('koa-body') // or koa-better-body, koa-multer, ...
const bodyClean = require('koa-body-clean')
const Koa = require('koa')
 
const app = new Koa()
 
app.use(body(bodyOptions))
app.use(bodyClean())

Skipping files

To skip a file from removal, set skip attribute to true in file object.

License

MIT

install

npm i koa-body-clean

Downloadsweekly downloads

8

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability