summaryrefslogtreecommitdiffstats
path: root/app/core/files.js
diff options
context:
space:
mode:
authorSimon Bartlett <simon@securitycompass.com>2015-02-06 15:18:21 -0500
committerSimon Bartlett <simon@securitycompass.com>2015-02-06 15:18:21 -0500
commit287d84ba5b75ed12162b1a6f2d0405ff6108e971 (patch)
treec1ae31a967d085dad99aa7295d67557cc000d6b1 /app/core/files.js
parentc95c3f6fd898da4b7aba83b73d2785d5061151fd (diff)
downloadlets-chat-287d84ba5b75ed12162b1a6f2d0405ff6108e971.zip
lets-chat-287d84ba5b75ed12162b1a6f2d0405ff6108e971.tar.gz
lets-chat-287d84ba5b75ed12162b1a6f2d0405ff6108e971.tar.bz2
Fix file type constraint config
Diffstat (limited to 'app/core/files.js')
-rw-r--r--app/core/files.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/core/files.js b/app/core/files.js
index 096d2f0..50ed8ba 100644
--- a/app/core/files.js
+++ b/app/core/files.js
@@ -24,7 +24,8 @@ FileManager.prototype.create = function(options, cb) {
return cb('Files are disabled.');
}
- if (settings.allowed_file_types &&
+ if (settings.restrict_file_types &&
+ settings.allowed_file_types &&
settings.allowed_file_types.length &&
!_.include(settings.allowed_file_types, options.file.mimetype)) {
return cb('The MIME type ' + options.file.mimetype +