Allow more detailed configuration of upload mime types
Fixes #637 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user