mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
log unlink error
This commit is contained in:
@@ -6,6 +6,7 @@ var fs = require('fs'),
|
|||||||
nconf = require('nconf'),
|
nconf = require('nconf'),
|
||||||
async = require('async'),
|
async = require('async'),
|
||||||
validator = require('validator'),
|
validator = require('validator'),
|
||||||
|
winston = require('winston'),
|
||||||
|
|
||||||
db = require('../database'),
|
db = require('../database'),
|
||||||
user = require('../user'),
|
user = require('../user'),
|
||||||
@@ -484,7 +485,9 @@ accountsController.uploadPicture = function (req, res, next) {
|
|||||||
user.uploadPicture(updateUid, userPhoto, next);
|
user.uploadPicture(updateUid, userPhoto, next);
|
||||||
}
|
}
|
||||||
], function(err, image) {
|
], function(err, image) {
|
||||||
fs.unlink(userPhoto.path);
|
fs.unlink(userPhoto.path, function(err) {
|
||||||
|
winston.error('unabled to delete picture', err);
|
||||||
|
});
|
||||||
if (err) {
|
if (err) {
|
||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user