mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
Allow more detailed configuration of upload mime types
Fixes #637 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
parent
40d1d75704
commit
a7935a595a
4 changed files with 29 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue