remove startup dependency on s3 settings

This commit is contained in:
Brian Gough 2016-03-09 13:28:02 +00:00
parent b780df6801
commit 7e6ea2793b

View file

@ -9,12 +9,11 @@ zlib = require "zlib"
DAYS = 24 * 3600 * 1000 # one day in milliseconds
AWS_CONFIG = {
accessKeyId: settings.trackchanges.s3.key
secretAccessKey: settings.trackchanges.s3.secret
}
createStream = (streamConstructor, project_id, doc_id, pack_id) ->
AWS_CONFIG =
accessKeyId: settings.trackchanges.s3.key
secretAccessKey: settings.trackchanges.s3.secret
return streamConstructor new AWS.S3(AWS_CONFIG), {
"Bucket": settings.trackchanges.stores.doc_history,
"Key": project_id+"/changes-"+doc_id+"/pack-"+pack_id