mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
fix profile image upload on subfolder install
This commit is contained in:
@@ -356,7 +356,7 @@ accountsController.accountSettings = function(req, res, next) {
|
||||
},
|
||||
userGroups: function(next) {
|
||||
groups.getUserGroups([userData.uid], next);
|
||||
},
|
||||
},
|
||||
languages: function(next) {
|
||||
languages.list(next);
|
||||
}
|
||||
@@ -434,7 +434,7 @@ accountsController.uploadPicture = function (req, res, next) {
|
||||
|
||||
user.setUserFields(updateUid, {uploadedpicture: image.url, picture: image.url});
|
||||
|
||||
res.json([{name: userPhoto.name, url: nconf.get('relative_path') + image.url}]);
|
||||
res.json([{name: userPhoto.name, url: image.url.startsWith('http') ? image.url : nconf.get('relative_path') + image.url}]);
|
||||
}
|
||||
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user