diff --git a/services/filestore/app/coffee/BucketController.coffee b/services/filestore/app/coffee/BucketController.coffee index 81c660ec69..bb7bd4544b 100644 --- a/services/filestore/app/coffee/BucketController.coffee +++ b/services/filestore/app/coffee/BucketController.coffee @@ -9,7 +9,7 @@ module.exports = BucketController = getFile: (req, res)-> {bucket} = req.params key = req.params[0] - credentials = settings.filestore.s3?[bucket] + credentials = settings.filestore.s3BucketCreds?[bucket] options = { key: key, bucket: bucket, diff --git a/services/filestore/config/settings.defaults.coffee b/services/filestore/config/settings.defaults.coffee index 62d42cf9e3..59f5d8a0a6 100644 --- a/services/filestore/config/settings.defaults.coffee +++ b/services/filestore/config/settings.defaults.coffee @@ -28,11 +28,14 @@ module.exports = # s3: # key: "" # default # secret: "" # default + # + # s3BucketCreds: # bucketname1: # secrets for bucketname1 # auth_key: "" # auth_secret: "" # bucketname2: # secrets for bucketname2... - s3: JSON.parse process.env['S3_CREDENTIALS'] if process.env['S3_CREDENTIALS'] + + s3BucketCreds: JSON.parse process.env['S3_BUCKET_CREDENTIALS'] if process.env['S3_BUCKET_CREDENTIALS'] path: uploadFolder: Path.resolve(__dirname + "/../uploads")