autoblogger 0.2.29 → 0.2.30
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/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7122,14 +7122,15 @@ async function uploadToS3(buffer, filename, contentType, config) {
|
|
|
7122
7122
|
const client = await getS3Client(config);
|
|
7123
7123
|
const ext = filename.split(".").pop()?.toLowerCase() || "jpg";
|
|
7124
7124
|
const key = `uploads/${randomUUID()}.${ext}`;
|
|
7125
|
+
const acl = config.acl !== void 0 ? config.acl : "public-read";
|
|
7125
7126
|
const params = {
|
|
7126
7127
|
Bucket: config.bucket,
|
|
7127
7128
|
Key: key,
|
|
7128
7129
|
Body: buffer,
|
|
7129
7130
|
ContentType: contentType
|
|
7130
7131
|
};
|
|
7131
|
-
if (
|
|
7132
|
-
params.ACL =
|
|
7132
|
+
if (acl) {
|
|
7133
|
+
params.ACL = acl;
|
|
7133
7134
|
}
|
|
7134
7135
|
await client.send(new PutObjectCommand(params));
|
|
7135
7136
|
const cdnEndpoint = config.cdnEndpoint || config.endpoint || `https://${config.bucket}.s3.${config.region || "us-east-1"}.amazonaws.com`;
|