diff options
author | Christoph (Sheogorath) Kern | 2018-01-23 12:10:33 +0100 |
---|---|---|
committer | GitHub | 2018-01-23 12:10:33 +0100 |
commit | 584f1c524904147df41d642db6303a13c968e6d1 (patch) | |
tree | 07f4cda1da15e214801138ea80581f7ec9e1e94f /lib/config | |
parent | e0389bc4cf21da4dac0f42b9f2a6d3cdf5b0d669 (diff) | |
parent | a7935a595a6d482aaefb5a3c9fa0600adf2d2c5b (diff) |
Merge pull request #691 from SISheogorath/feature/upload
Allow more detailed configuration of upload mime types
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 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) |