From 80c44ed9c19855d494ab26011dca0f6fbc644d0c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 4 Dec 2016 12:26:12 +0100 Subject: Do not autoplay videos, display play button instead. Use expiring links when using S3. Do not keep originals for avatars/headers, resize avatars down to 120x120 instead of 300x300. Set cache headers on S3 stuff, also make it private (aka only accessible via expiring links to prevent hotlinking) --- app/views/api/v1/media/create.rabl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/api/v1/media') diff --git a/app/views/api/v1/media/create.rabl b/app/views/api/v1/media/create.rabl index 803a93094..2a4db7aae 100644 --- a/app/views/api/v1/media/create.rabl +++ b/app/views/api/v1/media/create.rabl @@ -1,5 +1,5 @@ object @media attribute :id, :type -node(:url) { |media| full_asset_url(media.file.url) } -node(:preview_url) { |media| full_asset_url(media.file.url(:small)) } +node(:url) { |media| full_asset_url(media.file.expiring_url(3600, :original)) } +node(:preview_url) { |media| full_asset_url(media.file.expiring_url(3600, :small)) } node(:text_url) { |media| medium_url(media) } -- cgit