Barış Soner Uşaklı 4 years ago
parent 093f984b03
commit 9ee1fb490e

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

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

Loading…
Cancel
Save