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