From 5c5d8a307a816afcda4b97eecf49b836fc9ecb01 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Mon, 25 Nov 2019 11:20:33 -0500 Subject: [PATCH] FIX: Only trigger upload ACL update when needed In `post_creator`, the ACL update is only necessary when uploads need to be secured. This should fix a regression with S3 clones that do not support updating ACLs. --- lib/post_creator.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/post_creator.rb b/lib/post_creator.rb index 7359d8ec3ae..dd745d7c49f 100644 --- a/lib/post_creator.rb +++ b/lib/post_creator.rb @@ -375,7 +375,9 @@ class PostCreator end def update_uploads_secure_status - @post.update_uploads_secure_status + if SiteSetting.secure_media? || SiteSetting.prevent_anons_from_downloading_files? + @post.update_uploads_secure_status + end end def handle_spam