diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-30 19:31:14 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-30 19:31:57 -0500 |
commit | e881d75632898d1544962fa5f38f418ab0ab152f (patch) | |
tree | 85d661098c727a2d29ed14cf036e1ed04982a7c6 /app/serializers/rest | |
parent | 90ffbb0ada5c81451742e66635bc54eb0f7716f2 (diff) |
(asynchronously) re-fetch missing media on serialize
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/media_attachment_serializer.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/serializers/rest/media_attachment_serializer.rb b/app/serializers/rest/media_attachment_serializer.rb index 1b3498ea4..35467ded8 100644 --- a/app/serializers/rest/media_attachment_serializer.rb +++ b/app/serializers/rest/media_attachment_serializer.rb @@ -13,6 +13,7 @@ class REST::MediaAttachmentSerializer < ActiveModel::Serializer def url if object.needs_redownload? + FetchMediaWorker.perform_async(object.id) media_proxy_url(object.id, :original) else full_asset_url(object.file.url(:original)) |