@testomatio/reporter 1.6.3-beta-artifacts-2 → 1.6.3-beta-artifacts-3
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.
- package/lib/uploader.js +14 -7
- package/package.json +1 -1
package/lib/uploader.js
CHANGED
|
@@ -106,17 +106,24 @@ class S3Uploader {
|
|
|
106
106
|
|
|
107
107
|
debug('Uploading to S3:', Key);
|
|
108
108
|
|
|
109
|
-
const
|
|
109
|
+
const s3Config = this.#getS3Config()
|
|
110
|
+
const s3 = new S3(s3Config);
|
|
111
|
+
|
|
112
|
+
const params = {
|
|
113
|
+
Bucket: S3_BUCKET,
|
|
114
|
+
Key,
|
|
115
|
+
Body,
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// disable ACL for I AM roles
|
|
119
|
+
if (!s3Config.credentials.sessionToken) {
|
|
120
|
+
params.ACL = ACL;
|
|
121
|
+
}
|
|
110
122
|
|
|
111
123
|
try {
|
|
112
124
|
const upload = new Upload({
|
|
113
125
|
client: s3,
|
|
114
|
-
params
|
|
115
|
-
Bucket: S3_BUCKET,
|
|
116
|
-
Key,
|
|
117
|
-
Body,
|
|
118
|
-
ACL,
|
|
119
|
-
},
|
|
126
|
+
params,
|
|
120
127
|
});
|
|
121
128
|
|
|
122
129
|
const link = await this.getS3LocationLink(upload);
|