From 0d86781cb5cf83f27314949f12d1a85b5dbc9340 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 13 May 2019 15:54:37 -0400 Subject: [PATCH] fix: #7599 image size measurement erroring out on missing path --- src/controllers/admin/uploads.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/admin/uploads.js b/src/controllers/admin/uploads.js index 8aef187347..a0c27ae20c 100644 --- a/src/controllers/admin/uploads.js +++ b/src/controllers/admin/uploads.js @@ -291,7 +291,7 @@ function uploadImage(filename, folder, uploadedFile, req, res, next) { }), async.apply(meta.configs.set, 'brand:emailLogo', path.join(nconf.get('upload_url'), 'system/site-logo-x50.png')), function (next) { - image.size(imageData.path, function (err, size) { + image.size(uploadedFile.path, function (err, size) { if (err) { return next(err); } @@ -308,7 +308,7 @@ function uploadImage(filename, folder, uploadedFile, req, res, next) { next(err, imageData); }); } else if (path.basename(filename, path.extname(filename)) === 'og:image' && folder === 'system') { - image.size(imageData.path, function (err, size) { + image.size(uploadedFile.path, function (err, size) { if (err) { next(err); }