mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user