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:
Julian Lam
2015-11-09 14:39:00 -05:00
parent b9c9e24ca7
commit 051a8e22df
5 changed files with 9 additions and 44 deletions

View File

@@ -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);
}