Skip to content

Commit 3fe6ec7

Browse files
committed
Explicitely set uploaded image ACLs for S3 to "public-read"
This works around permission problems with DigitalOcean spaces (where files are always *private* by default). This should not pose a difference with AWS and other providers as CodiMD only works with public S3 assets either way. Signed-off-by: Martin Honermeyer <maze@strahlungsfrei.de>
1 parent a0cc195 commit 3fe6ec7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/web/imageRouter/s3.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ exports.uploadImage = function (imagePath, callback) {
2929
const params = {
3030
Bucket: config.s3bucket,
3131
Key: path.join('uploads', path.basename(imagePath)),
32-
Body: buffer
32+
Body: buffer,
33+
ACL: 'public-read'
3334
}
3435

3536
const mimeType = getImageMimeType(imagePath)

0 commit comments

Comments
 (0)