5d710b1139
Create MediaAttachment but without actual file download when domain is blocked with reject_media set to true Clean up old media files when creating a new domain block with reject_media set to true Return remote_url in media attachments API if local file is not present Undo domain block action in admin UI Ability to enable reject_media from admin UI
6 lines
327 B
Ruby
6 lines
327 B
Ruby
attributes :id, :remote_url, :type
|
|
|
|
node(:url) { |media| media.file.blank? ? media.remote_url : full_asset_url(media.file.url(:original)) }
|
|
node(:preview_url) { |media| media.file.blank? ? media.remote_url : full_asset_url(media.file.url(:small)) }
|
|
node(:text_url) { |media| media.local? ? medium_url(media) : nil }
|