@sprucelabs/spruce-file-utils 18.0.17 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,9 +41,11 @@ class S3UploadStrategy {
41
41
  Bucket: AWS_S3_BUCKET,
42
42
  Key: name,
43
43
  Body: buffer,
44
- ACL: 'public-read',
45
44
  ContentType: type,
46
45
  };
46
+ if (process.env.AWS_S3_OBJECT_ACL !== 'false') {
47
+ s3Params.ACL = 'public-read';
48
+ }
47
49
  const uploadedFile = yield s3.upload(s3Params).promise();
48
50
  return uploadedFile.Location;
49
51
  });
@@ -36,9 +36,11 @@ class S3UploadStrategy {
36
36
  Bucket: AWS_S3_BUCKET,
37
37
  Key: name,
38
38
  Body: buffer,
39
- ACL: 'public-read',
40
39
  ContentType: type,
41
40
  };
41
+ if (process.env.AWS_S3_OBJECT_ACL !== 'false') {
42
+ s3Params.ACL = 'public-read';
43
+ }
42
44
  const uploadedFile = await s3.upload(s3Params).promise();
43
45
  return uploadedFile.Location;
44
46
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-file-utils",
3
3
  "description": "Utils for working with files and Sprucebot.",
4
- "version": "18.0.17",
4
+ "version": "18.1.0",
5
5
  "skill": {
6
6
  "namespace": "files"
7
7
  },