node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »



This package is a middleware for connect/express to remove potentially uploaded files after each request.

The bodyParser/multipart middleware is great to handle incoming requests and file uploads, but you may be getting files without even knowing it on routes where you don't expect them, thus filling the disk progressively.

This middleware enforces their deletion after the response is done.


var connect = require('connect')
  , cleaner = require('connect-fileupload-cleaner')