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/serializers | |
parent | 764b89939fe2fcb8c4389738af8685949104c144 (diff) |
Change local media attachments to perform heavy processing asynchronously (#13210)
Fix #9106
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/rest/media_attachment_serializer.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/serializers/rest/media_attachment_serializer.rb b/app/serializers/rest/media_attachment_serializer.rb index 1b3498ea4..cc10e3001 100644 --- a/app/serializers/rest/media_attachment_serializer.rb +++ b/app/serializers/rest/media_attachment_serializer.rb @@ -12,7 +12,9 @@ class REST::MediaAttachmentSerializer < ActiveModel::Serializer end def url - if object.needs_redownload? + if object.not_processed? + nil + elsif object.needs_redownload? media_proxy_url(object.id, :original) else full_asset_url(object.file.url(:original)) |