summaryrefslogtreecommitdiff
path: root/lib/config
diff options
context:
space:
mode:
Diffstat (limited to 'lib/config')
-rw-r--r--lib/config/index.js20
1 files changed, 20 insertions, 0 deletions
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)