jquery-file-upload-middleware
jquery-file-upload-middleware copied to clipboard
fix:Callback must be a function when use fs.unlink in node.js v7.0+
Since node v7.0.0, when use fs.unlink(path, callback) ,the callback parameter is no longer optional.
Like use in node v10.14.2
fs.js:137
throw new ERR_INVALID_CALLBACK();
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:137:11)
at Object.unlink (fs.js:936:14)
at ReadStream.<anonymous> (xxxxxxxxxxx\node_modules\jquery-file-upload-middleware\lib\uploadhandler.js:149:48)
at ReadStream.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
so i add some function(){}
as the callback parameter,then the code run well.
Same issue here... :-(