From 28deffedf98fea326b3cfc2b058ca4600ca5c6a9 Mon Sep 17 00:00:00 2001 From: Brian Bolt Date: Sun, 13 Dec 2020 13:25:57 -0800 Subject: [PATCH] Update uploadhandler.js --- lib/uploadhandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/uploadhandler.js b/lib/uploadhandler.js index 070f018..ceb9b2d 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.unlinkSync(file.path); generatePreviews(); } finish();