mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-09 02:37:01 +02:00
closes #1432
ability to select a default gravatar image (default, identicon, mystery-man, monsterid, wavatar, retro) or upload a custom image to use as default gravatar image
This commit is contained in:
@@ -87,7 +87,20 @@ uploadsController.uploadLogo = function(req, res, next) {
|
||||
if (validateUpload(res, req, allowedTypes)) {
|
||||
var filename = 'site-logo' + path.extname(req.files.userPhoto.name);
|
||||
uploadsController.uploadImage(filename, req, res);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
uploadsController.uploadGravatarDefault = function(req, res, next) {
|
||||
var allowedTypes = ['image/png', 'image/jpeg', 'image/pjpeg', 'image/jpg', 'image/gif'],
|
||||
er;
|
||||
|
||||
if (validateUpload(res, req, allowedTypes)) {
|
||||
var filename = 'gravatar-default' + path.extname(req.files.userPhoto.name);
|
||||
uploadsController.uploadImage(filename, req, res);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
module.exports = uploadsController;
|
||||
|
||||
Reference in New Issue
Block a user