diff options
author | Sheogorath | 2018-01-20 15:08:31 +0100 |
---|---|---|
committer | Sheogorath | 2018-01-20 15:16:53 +0100 |
commit | a7935a595a6d482aaefb5a3c9fa0600adf2d2c5b (patch) | |
tree | 15ff230007e15a6d1b08ba1c26b4a161a91252f8 /lib/config | |
parent | 40d1d757048b1eb51e45d4d29ad987739b478881 (diff) |
Allow more detailed configuration of upload mime types
Fixes #637
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'lib/config')
-rw-r--r-- | lib/config/index.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/config/index.js b/lib/config/index.js index d44207bf..13c4692c 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) |