seperate the standard s3 creds from the bucket s3 creds

This commit is contained in:
Henry Oswald 2018-07-10 14:17:37 +01:00
parent 0659878b50
commit 089bf3e084
2 changed files with 5 additions and 2 deletions

View file

@ -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,

View file

@ -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")