diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-03-08 23:56:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-08 23:56:18 +0100 |
commit | 9660aa4543deff41c60d131e081137f84e771499 (patch) | |
tree | 8809339341484045802fa46526c798ad0e68fb2c /app/models/concerns | |
parent | 764b89939fe2fcb8c4389738af8685949104c144 (diff) |
Change local media attachments to perform heavy processing asynchronously (#13210)
Fix #9106
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/attachmentable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/attachmentable.rb b/app/models/concerns/attachmentable.rb index 43ff8ac12..18b872c1e 100644 --- a/app/models/concerns/attachmentable.rb +++ b/app/models/concerns/attachmentable.rb @@ -74,7 +74,7 @@ module Attachmentable self.class.attachment_definitions.each_key do |attachment_name| attachment = send(attachment_name) - next if attachment.blank? || attachment.queued_for_write[:original].blank? + next if attachment.blank? || attachment.queued_for_write[:original].blank? || attachment.options[:preserve_files] attachment.instance_write :file_name, SecureRandom.hex(8) + File.extname(attachment.instance_read(:file_name)) end |