Skip to content
Snippets Groups Projects
Commit c589027a authored by Diego Sampaio's avatar Diego Sampaio
Browse files

fixes S3 config without acl

parent 71d421ad
No related branches found
No related tags found
No related merge requests found
......@@ -11,12 +11,10 @@ createS3Directive = _.debounce(() => {
if (Slingshot._directives[directiveName]) {
delete Slingshot._directives[directiveName];
}
Slingshot.createDirective(directiveName, Slingshot.S3Storage, {
var config = {
bucket: bucket,
acl: acl,
AWSAccessKeyId: accessKey,
AWSSecretAccessKey: secretKey,
key: function (file, metaContext) {
var serverIdentifier = '';
......@@ -28,7 +26,13 @@ createS3Directive = _.debounce(() => {
return path + Random.id();
}
}
});
};
if (!_.isEmpty(acl)) {
config.acl = acl;
}
Slingshot.createDirective(directiveName, Slingshot.S3Storage, config);
} else {
if (Slingshot._directives[directiveName]) {
delete Slingshot._directives[directiveName];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment