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:
Penar Musaraj
2019-06-05 23:27:24 -04:00
committed by Sam
parent e0c821ebb0
commit f00275ded3
13 changed files with 240 additions and 9 deletions

View File

@ -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