mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 03:57:06 -04:00
Merge pull request #691 from SISheogorath/feature/upload
Allow more detailed configuration of upload mime types
This commit is contained in:
commit
584f1c5249
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