@myrotvorets/clean-up-after-multer
v1.1.12
Published
Express.js middleware to clean up uploaded files after multer
Downloads
245
Maintainers
Readme
clean-up-after-multer
Express.js middleware to clean up uploaded files after multer
Usage
import express from 'express';
import { cleanUploadedFilesMiddleware } from '@myrotvorets/clean-up-after-multer'
const app = express();
app.use(/* your middlewares here */);
app.use(cleanUploadedFilesMiddleware());
Make sure to call next()
from your middlewares.
cleanUploadedFilesMiddleware()
accepts an argument of type (path: string) => Promise<unknown>
to specify the custom unlink()
function (in case you want to log unlink failures etc).