Add lutim support

Signed-off-by: Dylan Dervaux <dylanderv05@gmail.com>
This commit is contained in:
Dylan Dervaux
2019-02-01 12:33:27 +01:00
committed by Sheogorath
parent 36c083277e
commit 208070d2e7
7 changed files with 56 additions and 6 deletions

View File

@@ -58,8 +58,11 @@ module.exports = {
heartbeatTimeout: 10000,
// document
documentMaxLength: 100000,
// image upload setting, available options are imgur/s3/filesystem/azure
// image upload setting, available options are imgur/s3/filesystem/azure/lutim
imageUploadType: 'filesystem',
lutim: {
url: 'https://framapic.org/'
},
imgur: {
clientID: undefined
},

View File

@@ -49,6 +49,9 @@ module.exports = {
secure: toBooleanConfig(process.env.CMD_MINIO_SECURE),
port: toIntegerConfig(process.env.CMD_MINIO_PORT)
},
lutim: {
url: process.env.CMD_LUTIM_URL
},
s3bucket: process.env.CMD_S3_BUCKET,
azure: {
connectionString: process.env.CMD_AZURE_CONNECTION_STRING,

View File

@@ -164,8 +164,8 @@ if (config.sessionSecret === 'secret') {
}
// Validate upload upload providers
if (['filesystem', 's3', 'minio', 'imgur', 'azure'].indexOf(config.imageUploadType) === -1) {
logger.error('"imageuploadtype" is not correctly set. Please use "filesystem", "s3", "minio", "azure" or "imgur". Defaulting to "filesystem"')
if (['filesystem', 's3', 'minio', 'imgur', 'azure', 'lutim'].indexOf(config.imageUploadType) === -1) {
logger.error('"imageuploadtype" is not correctly set. Please use "filesystem", "s3", "minio", "azure", "lutim" or "imgur". Defaulting to "filesystem"')
config.imageUploadType = 'filesystem'
}