about summary refs log tree commit diff
path: root/app/views/api/v1/statuses/_media.rabl
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-04 12:26:12 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-04 12:28:10 +0100
commit80c44ed9c19855d494ab26011dca0f6fbc644d0c (patch)
treea14d280f0fa88bfa6e3ef97fff26d50a632471b3 /app/views/api/v1/statuses/_media.rabl
parent290ffb63cdf4753bc30224619f182cc3db654e91 (diff)
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)
Diffstat (limited to 'app/views/api/v1/statuses/_media.rabl')
-rw-r--r--app/views/api/v1/statuses/_media.rabl4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/api/v1/statuses/_media.rabl b/app/views/api/v1/statuses/_media.rabl
index e4ceef763..76256ed2c 100644
--- a/app/views/api/v1/statuses/_media.rabl
+++ b/app/views/api/v1/statuses/_media.rabl
@@ -1,4 +1,4 @@
 attributes :id, :remote_url, :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)) }