mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 09:25:45 +01:00
fixed filename of first uploaded image, added a setUserFields method to user.js
This commit is contained in:
@@ -99,7 +99,7 @@ var user = require('./../user.js'),
|
|||||||
user.getUserField(req.user.uid, 'uploadedpicture', function(oldpicture) {
|
user.getUserField(req.user.uid, 'uploadedpicture', function(oldpicture) {
|
||||||
|
|
||||||
if(!oldpicture) {
|
if(!oldpicture) {
|
||||||
uploadUserPicture(req.user.uid, req.files.userPhoto.name, req.files.userPhoto.path, res);
|
uploadUserPicture(req.user.uid, path.extname(req.files.userPhoto.name), req.files.userPhoto.path, res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user