This commit is contained in:
barisusakli
2015-04-14 14:27:42 -04:00
parent f7a3aef322
commit d5dd48ecc8
4 changed files with 14 additions and 1 deletions

View File

@@ -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);