mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	closes #6003
This commit is contained in:
		| @@ -37,6 +37,9 @@ uploadsController.upload = function (req, res, filesIterator) { | ||||
|  | ||||
| uploadsController.uploadPost = function (req, res, next) { | ||||
| 	uploadsController.upload(req, res, function (uploadedFile, next) { | ||||
| 		if (!parseInt(req.body.cid, 10)) { | ||||
| 			return next(new Error('[[error:category-not-selected]]')); | ||||
| 		} | ||||
| 		var isImage = uploadedFile.type.match(/image./); | ||||
| 		if (isImage) { | ||||
| 			uploadAsImage(req, uploadedFile, next); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user