From 62e884047c5222227105cb40da5e36eb38c089bd Mon Sep 17 00:00:00 2001 From: havyan Date: Sun, 10 Feb 2019 00:27:59 -0600 Subject: [PATCH] Fix --- lib/uploadhandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/uploadhandler.js b/lib/uploadhandler.js index 070f018..5b40df5 100644 --- a/lib/uploadhandler.js +++ b/lib/uploadhandler.js @@ -146,7 +146,7 @@ module.exports = function (options) { var os = fs.createWriteStream(options.uploadDir() + '/' + fileInfo.name); is.on('end', function (err) { if (!err) { - fs.unlink(file.path); + fs.unlink(file.path, function() {}); generatePreviews(); } finish();