diff options
author | Christoph (Sheogorath) Kern | 2019-04-10 11:39:11 +0200 |
---|---|---|
committer | GitHub | 2019-04-10 11:39:11 +0200 |
commit | ef348fc49b01711aaea3c0b68cdd9fa77876c596 (patch) | |
tree | 496225cc71133387b3c6e51b899d9a91d204f420 /lib/config | |
parent | f541c00bad561672c91bb0249acd8e6ce2f58a9e (diff) | |
parent | 208070d2e776c437154e6ead552364b3956adf1c (diff) |
Merge pull request #33 from codimd/lutim-support
Add support for image hosting with lutim
Diffstat (limited to '')
-rw-r--r-- | lib/config/default.js | 5 | ||||
-rw-r--r-- | lib/config/environment.js | 3 | ||||
-rw-r--r-- | lib/config/index.js | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/config/default.js b/lib/config/default.js index 98ccee91..c87beda3 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -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 }, diff --git a/lib/config/environment.js b/lib/config/environment.js index 882df140..508c1ba6 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -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, diff --git a/lib/config/index.js b/lib/config/index.js index 4c28196e..e102dce9 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -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' } |