Skip to content

Node.js based forum software built for the modern web

fixed filename of first uploaded image, added a setUserFields method to user.js

Baris Soner Usaklicacc732015c6
diff --git a/src/routes/user.js b/src/routes/user.js
index c433814709..710fe5b409 100644
--- a/src/routes/user.js
+++ b/src/routes/user.js
@@ -99,7 +99,7 @@ var user = require('./../user.js'),
user.getUserField(req.user.uid, 'uploadedpicture', function(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;
}