diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/config.js b/lib/config.js index 001cc8fa..ecc68f75 100644 --- a/lib/config.js +++ b/lib/config.js @@ -59,6 +59,15 @@ var documentmaxlength = config.documentmaxlength || 100000; // image upload setting, available options are imgur/s3/filesystem var imageUploadType = config.imageUploadType || 'imgur'; +var s3Keys = ['accessKeyId', 'secretAccessKey', 'region']; +config.s3 = config.s3 || {}; +var s3 = s3Keys.reduce(function(prev, cur) { + prev[cur] = config.s3[cur]; + return prev; +}, {}); + +var s3bucket = config.s3.bucket; + // auth var facebook = (process.env.HMD_FACEBOOK_CLIENTID && process.env.HMD_FACEBOOK_CLIENTSECRET) ? { clientID: process.env.HMD_FACEBOOK_CLIENTID, @@ -143,5 +152,7 @@ module.exports = { dropbox: dropbox, google: google, imgur: imgur, - imageUploadType: imageUploadType + imageUploadType: imageUploadType, + s3: s3, + s3bucket: s3bucket }; |