FIX: Only trigger upload ACL update when needed

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.

diff --git a/lib/post_creator.rb b/lib/post_creator.rb
index 7359d8ec3a..dd745d7c49 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

GitHub sha: 5c5d8a30

This commit has been mentioned on Discourse Meta. There might be relevant details there:

This commit has been mentioned on Discourse Meta. There might be relevant details there: