mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
Removed allowedFileExtensions meta config
Now, when NodeBB needs to determine file compatibility, jimp will attempt to open the file for reading. If it fails, file is considered to be of an invalid type.
This commit is contained in:
@@ -46,7 +46,7 @@ uploadsController.upload = function(req, res, filesIterator, next) {
|
||||
|
||||
uploadsController.uploadPost = function(req, res, next) {
|
||||
uploadsController.upload(req, res, function(uploadedFile, next) {
|
||||
file.isFileTypeAllowed(uploadedFile.path, file.allowedExtensions(), function(err) {
|
||||
file.isFileTypeAllowed(uploadedFile.path, function(err) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ uploadsController.uploadThumb = function(req, res, next) {
|
||||
}
|
||||
|
||||
uploadsController.upload(req, res, function(uploadedFile, next) {
|
||||
file.isFileTypeAllowed(uploadedFile.path, file.allowedExtensions(), function(err) {
|
||||
file.isFileTypeAllowed(uploadedFile.path, function(err) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user