@certik/skynet 0.10.41 → 0.10.42
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/s3.js +7 -7
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/s3.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
const {
|
|
2
|
-
getAWSAccessKeyId,
|
|
3
|
-
getAWSSecretAccessKey,
|
|
4
|
-
getAWSRegion
|
|
5
|
-
} = require("./env");
|
|
1
|
+
const { getAWSAccessKeyId, getAWSSecretAccessKey, getAWSRegion } = require("./env");
|
|
6
2
|
const { S3 } = require("aws-sdk");
|
|
7
3
|
|
|
8
4
|
function getS3() {
|
|
9
5
|
return new S3({
|
|
10
6
|
accessKeyId: getAWSAccessKeyId(),
|
|
11
7
|
secretAccessKey: getAWSSecretAccessKey(),
|
|
12
|
-
region: getAWSRegion()
|
|
8
|
+
region: getAWSRegion(),
|
|
13
9
|
});
|
|
14
10
|
}
|
|
15
11
|
|
|
@@ -63,6 +59,10 @@ async function writeFile(bucketName, key, body, options = {}) {
|
|
|
63
59
|
params.ACL = options.acl;
|
|
64
60
|
}
|
|
65
61
|
|
|
62
|
+
if (options.contentType) {
|
|
63
|
+
params.ContentType = options.contentType;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
if (verbose) {
|
|
67
67
|
console.log("uploading", key);
|
|
68
68
|
}
|
|
@@ -118,5 +118,5 @@ module.exports = {
|
|
|
118
118
|
readFile,
|
|
119
119
|
writeFile,
|
|
120
120
|
deleteFile,
|
|
121
|
-
listKeys
|
|
121
|
+
listKeys,
|
|
122
122
|
};
|