|
|
@@ -108,7 +108,7 @@ const ErrorV3 = require('../../models/vo/error-apiv3');
|
|
|
* s3SecretAccessKey:
|
|
|
* type: string
|
|
|
* description: secret key for authentification of AWS
|
|
|
- * s3IsEnabledInternalStreamSystem:
|
|
|
+ * s3ReferenceFileWithRelayMode:
|
|
|
* type: boolean
|
|
|
* description: is enable internal stream system for s3 file request
|
|
|
* gcsApiKeyJsonPath:
|
|
|
@@ -120,7 +120,7 @@ const ErrorV3 = require('../../models/vo/error-apiv3');
|
|
|
* gcsUploadNamespace:
|
|
|
* type: string
|
|
|
* description: name space of gcs
|
|
|
- * gcsIsEnabledInternalStreamSystem:
|
|
|
+ * gcsReferenceFileWithRelayMode:
|
|
|
* type: boolean
|
|
|
* description: is enable internal stream system for gcs file request
|
|
|
* envGcsApiKeyJsonPath:
|
|
|
@@ -177,7 +177,7 @@ module.exports = (crowi) => {
|
|
|
body('gcsApiKeyJsonPath').trim(),
|
|
|
body('gcsBucket').trim(),
|
|
|
body('gcsUploadNamespace').trim(),
|
|
|
- body('gcsIsEnabledInternalStreamSystem').if(value => value != null).isBoolean(),
|
|
|
+ body('gcsReferenceFileWithRelayMode').if(value => value != null).isBoolean(),
|
|
|
body('s3Region').trim().if(value => value !== '').matches(/^[a-z]+-[a-z]+-\d+$/)
|
|
|
.withMessage((value, { req }) => req.t('validation.aws_region')),
|
|
|
body('s3CustomEndpoint').trim().if(value => value !== '').matches(/^(https?:\/\/[^/]+|)$/)
|
|
|
@@ -185,7 +185,7 @@ module.exports = (crowi) => {
|
|
|
body('s3Bucket').trim(),
|
|
|
body('s3AccessKeyId').trim().if(value => value !== '').matches(/^[\da-zA-Z]+$/),
|
|
|
body('s3SecretAccessKey').trim(),
|
|
|
- body('s3IsEnabledInternalStreamSystem').if(value => value != null).isBoolean(),
|
|
|
+ body('s3ReferenceFileWithRelayMode').if(value => value != null).isBoolean(),
|
|
|
],
|
|
|
pluginSetting: [
|
|
|
body('isEnabledPlugins').isBoolean(),
|
|
|
@@ -240,10 +240,14 @@ module.exports = (crowi) => {
|
|
|
s3Bucket: crowi.configManager.getConfig('crowi', 'aws:s3Bucket'),
|
|
|
s3AccessKeyId: crowi.configManager.getConfig('crowi', 'aws:s3AccessKeyId'),
|
|
|
s3SecretAccessKey: crowi.configManager.getConfig('crowi', 'aws:s3SecretAccessKey'),
|
|
|
+ s3ReferenceFileWithRelayMode: crowi.configManager.getConfig('crowi', 'aws:referenceFileWithRelayMode'),
|
|
|
+
|
|
|
gcsUseOnlyEnvVars: crowi.configManager.getConfig('crowi', 'gcs:useOnlyEnvVarsForSomeOptions'),
|
|
|
gcsApiKeyJsonPath: crowi.configManager.getConfig('crowi', 'gcs:apiKeyJsonPath'),
|
|
|
gcsBucket: crowi.configManager.getConfig('crowi', 'gcs:bucket'),
|
|
|
gcsUploadNamespace: crowi.configManager.getConfig('crowi', 'gcs:uploadNamespace'),
|
|
|
+ gcsReferenceFileWithRelayMode: crowi.configManager.getConfig('crowi', 'gcs:referenceFileWithRelayMode'),
|
|
|
+
|
|
|
envGcsApiKeyJsonPath: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:apiKeyJsonPath'),
|
|
|
envGcsBucket: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:bucket'),
|
|
|
envGcsUploadNamespace: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:uploadNamespace'),
|
|
|
@@ -589,7 +593,7 @@ module.exports = (crowi) => {
|
|
|
requestParams['gcs:apiKeyJsonPath'] = req.body.gcsApiKeyJsonPath;
|
|
|
requestParams['gcs:bucket'] = req.body.gcsBucket;
|
|
|
requestParams['gcs:uploadNamespace'] = req.body.gcsUploadNamespace;
|
|
|
- requestParams['gcs:isEnabledInternalStreamSystem'] = req.body.gcsIsEnabledInternalStreamSystem;
|
|
|
+ requestParams['gcs:referenceFileWithRelayMode'] = req.body.gcsReferenceFileWithRelayMode;
|
|
|
}
|
|
|
|
|
|
if (fileUploadType === 'aws') {
|
|
|
@@ -598,7 +602,7 @@ module.exports = (crowi) => {
|
|
|
requestParams['aws:s3Bucket'] = req.body.s3Bucket;
|
|
|
requestParams['aws:s3AccessKeyId'] = req.body.s3AccessKeyId;
|
|
|
requestParams['aws:s3SecretAccessKey'] = req.body.s3SecretAccessKey;
|
|
|
- requestParams['aws:isEnabledInternalStreamSystem'] = req.body.s3IsEnabledInternalStreamSystem;
|
|
|
+ requestParams['aws:referenceFileWithRelayMode'] = req.body.s3ReferenceFileWithRelayMode;
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
@@ -614,7 +618,7 @@ module.exports = (crowi) => {
|
|
|
responseParams.gcsApiKeyJsonPath = crowi.configManager.getConfig('crowi', 'gcs:apiKeyJsonPath');
|
|
|
responseParams.gcsBucket = crowi.configManager.getConfig('crowi', 'gcs:bucket');
|
|
|
responseParams.gcsUploadNamespace = crowi.configManager.getConfig('crowi', 'gcs:uploadNamespace');
|
|
|
- responseParams.gcsIsEnabledInternalStreamSystem = crowi.configManager.getConfig('crowi', 'gcs:isEnabledInternalStreamSystem');
|
|
|
+ responseParams.gcsReferenceFileWithRelayMode = crowi.configManager.getConfig('crowi', 'gcs:referenceFileWithRelayMode ');
|
|
|
}
|
|
|
|
|
|
if (fileUploadType === 'aws') {
|
|
|
@@ -623,7 +627,7 @@ module.exports = (crowi) => {
|
|
|
responseParams.s3Bucket = crowi.configManager.getConfig('crowi', 'aws:s3Bucket');
|
|
|
responseParams.s3AccessKeyId = crowi.configManager.getConfig('crowi', 'aws:s3AccessKeyId');
|
|
|
responseParams.s3SecretAccessKey = crowi.configManager.getConfig('crowi', 'aws:s3SecretAccessKey');
|
|
|
- responseParams.s3IsEnabledInternalStreamSystem = crowi.configManager.getConfig('crowi', 'aws:isEnabledInternalStreamSystem');
|
|
|
+ responseParams.s3ReferenceFileWithRelayMode = crowi.configManager.getConfig('crowi', 'aws:referenceFileWithRelayMode');
|
|
|
}
|
|
|
|
|
|
return res.apiv3({ responseParams });
|