From 4e177929d572f22a580bd0b29f81d7ec9067b269 Mon Sep 17 00:00:00 2001 From: tycrek Date: Wed, 16 Jun 2021 14:45:00 -0600 Subject: [PATCH] added Amazon S3 config fields to setup --- setup.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/setup.js b/setup.js index a2c452c..e55a95b 100755 --- a/setup.js +++ b/setup.js @@ -11,6 +11,11 @@ var config = { diskFilePath: "uploads/", saveWithDate: false, saveAsOriginal: true, + s3enabled: false, + s3endpoint: 'sfo3.digitaloceanspaces.com', + s3bucket: 'bucket-name', + s3accessKey: 'accessKey', + s3secretKey: 'secretKey', }; // If directly called on the command line, run setup script @@ -101,6 +106,36 @@ if (require.main === module) { default: config.saveAsOriginal, required: false }, + s3enabled: { + description: 'Enable uploading to S3 storage endpoints', + type: 'boolean', + default: config.s3enabled, + required: false + }, + s3endpoint: { + description: 'S3 Endpoint URL to upload objects to', + type: 'string', + default: config.s3endpoint, + required: false + }, + s3bucket: { + description: 'S3 Bucket name to upload objects to', + type: 'string', + default: config.s3bucket, + required: false + }, + s3accessKey: { + description: 'Access key for the specified S3 API', + type: 'string', + default: config.s3accessKey, + required: false + }, + s3secretKey: { + description: 'Secret key for the specified S3 API', + type: 'string', + default: config.s3secretKey, + required: false + }, } };