Commit 3fe6ec71 authored by Martin Honermeyer's avatar Martin Honermeyer
Browse files

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: default avatarMartin Honermeyer <maze@strahlungsfrei.de>
parent a0cc1955
......@@ -29,7 +29,8 @@ exports.uploadImage = function (imagePath, callback) {
const params = {
Bucket: config.s3bucket,
Key: path.join('uploads', path.basename(imagePath)),
Body: buffer
Body: buffer,
ACL: 'public-read'
}
const mimeType = getImageMimeType(imagePath)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment