mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-09-02 06:06:58 +02:00
closes #3013
This commit is contained in:
@@ -24,6 +24,9 @@ module.exports = function(User) {
|
||||
var convertToPNG = parseInt(meta.config['profile:convertProfileImageToPNG'], 10) === 1;
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
next(parseInt(meta.config.allowProfileImageUploads) !== 1 ? new Error('[[error:profile-image-uploads-disabled]]') : null);
|
||||
},
|
||||
function(next) {
|
||||
next(picture.size > uploadSize * 1024 ? new Error('[[error:file-too-big, ' + uploadSize + ']]') : null);
|
||||
},
|
||||
@@ -44,7 +47,6 @@ module.exports = function(User) {
|
||||
}
|
||||
}
|
||||
], function(err, result) {
|
||||
|
||||
function done(err, image) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
|
||||
Reference in New Issue
Block a user