Skip to content

Commit 240cfe9

Browse files
committed
Fix issue: Callback must be a function when call delete on NodeJS v7+
1 parent 7188cf0 commit 240cfe9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/uploadhandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ module.exports = function (options) {
189189
}
190190
fs.unlink(filepath, function (ex) {
191191
_.each(options.imageVersions, function (value, version) {
192-
fs.unlink(path.join(options.uploadDir(), version, fileName));
192+
fs.unlink(path.join(options.uploadDir(), version, fileName), function(){});
193193
});
194194
self.emit('delete', fileName);
195195
self.callback({success: !ex});

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "jquery-file-upload-middleware",
3-
"author": "Aleksandr Guidrevitch <aguidrevitch@gmail.com>",
4-
"description": "jQuery-File-Upload Express.js Middleware",
2+
"name": "jquery-file-upload-middleware-fix",
3+
"author": "Aleksandr Guidrevitch <aguidrevitch@gmail.com> - fix issue by haruthuc@gmail.com ",
4+
"description": "jQuery-File-Upload-Fix Express.js Middleware",
55
"keywords": [
66
"jquery",
77
"upload",
@@ -29,6 +29,6 @@
2929
"scripts": {
3030
"test": "echo \"Error: no test specified\" && exit 1"
3131
},
32-
"_id": "jquery-file-upload-middleware@0.1.7",
32+
"_id": "jquery-file-upload-middleware-fix@0.1.1",
3333
"license": "MIT"
3434
}

0 commit comments

Comments
 (0)