mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:03:34 +08:00
FEATURE: Support private attachments when using S3 storage (#7677)
* Support private uploads in S3 * Use localStore for local avatars * Add job to update private upload ACL on S3 * Test multisite paths * update ACL for private uploads in migrate_to_s3 task
This commit is contained in:
@ -425,6 +425,10 @@ def migrate_to_s3
|
||||
options[:content_disposition] =
|
||||
%Q{attachment; filename="#{upload.original_filename}"}
|
||||
end
|
||||
|
||||
if upload&.private?
|
||||
options[:acl] = "private"
|
||||
end
|
||||
end
|
||||
|
||||
etag ||= Digest::MD5.file(path).hexdigest
|
||||
|
Reference in New Issue
Block a user