Upload objects to private S3 is not working

After doing a big research, I’ve not found any guide to upload images to S3 with private ACL.

I’m experiencing a weird behavior where the backups work but not uploadimg of images.

I narrowed the issue down to a problem with ACL of the bucket (I proved that the problem is the ACL since I’m able to upload file using the sdk without specifing the ACL flag). In some cases the “block access to public” permission are set at account level and not bucket level so deactivating the checkbox in the bucket config won’t work.

I noticed that the S3 upload config code was updated, and now the ACL is set based on a param, is there away to pass that config down? discourse/s3_store.rb at tests-passed · discourse/discourse · GitHub

Secure Media Uploads describes how to limit uploads to logged in users. Perhaps that will help?

2 Likes

I tried that, images get uploaded but I get a 500 error in the dashboard with no clue, no logs