This commit is contained in:
Barış Soner Uşaklı
2020-11-23 11:18:42 -05:00
parent 093f984b03
commit 9ee1fb490e
2 changed files with 2 additions and 0 deletions

View File

@@ -117,6 +117,7 @@ uploadsController.uploadThumb = async function (req, res, next) {
throw new Error('[[error:invalid-file]]');
}
await image.isFileTypeAllowed(uploadedFile.path);
await image.checkDimensions(uploadedFile.path);
await image.resizeImage({
path: uploadedFile.path,
width: meta.config.topicThumbSize,

View File

@@ -47,6 +47,7 @@ module.exports = function (Topics) {
await image.isFileTypeAllowed(pathToUpload);
await image.checkDimensions(pathToUpload);
await image.resizeImage({
path: pathToUpload,
width: meta.config.topicThumbSize,