diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config/environment.js | 2 | ||||
-rw-r--r-- | lib/config/index.js | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/lib/config/environment.js b/lib/config/environment.js index 932363da..e2112b6a 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -39,7 +39,7 @@ module.exports = { secretKey: process.env.HMD_MINIO_SECRET_KEY, endPoint: process.env.HMD_MINIO_ENDPOINT, secure: toBooleanConfig(process.env.HMD_MINIO_SECURE), - port: parseInt(process.env.HMD_MINIO_PORT) + port: process.env.HMD_MINIO_PORT }, s3bucket: process.env.HMD_S3_BUCKET, facebook: { diff --git a/lib/config/index.js b/lib/config/index.js index 3d22c3c3..4f6b4b6a 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -97,6 +97,26 @@ config.isLDAPEnable = config.ldap.url config.isSAMLEnable = config.saml.idpSsoUrl config.isPDFExportEnable = config.allowpdfexport +// figure out mime types for image uploads +switch (config.imageUploadType) { + case 'imgur': + config.allowedUploadMimeTypes = [ + 'image/jpeg', + 'image/png', + 'image/jpg', + 'image/gif' + ] + break + default: + config.allowedUploadMimeTypes = [ + 'image/jpeg', + 'image/png', + 'image/jpg', + 'image/gif', + 'image/svg+xml' + ] +} + // generate correct path config.sslcapath.forEach(function (capath, i, array) { array[i] = path.resolve(appRootPath, capath) |