From 193dddb433f27cc61e1977148cbd01d61bb87fbf Mon Sep 17 00:00:00 2001 From: Francis Chong Date: Wed, 26 Apr 2017 09:48:12 +0800 Subject: Add media dimensions (#2448) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixes #1985 - add migration AddMediaAttachmentMeta, which add meta field to media_attachments - before saving attachment, set file meta if needed - add meta in api * add spec * align the “size” format for image and video * fix code climate * fixes media_attachment_spec.rb --- app/views/api/v1/statuses/_media.rabl | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views/api/v1/statuses/_media.rabl') diff --git a/app/views/api/v1/statuses/_media.rabl b/app/views/api/v1/statuses/_media.rabl index 2f56c6d07..bcba78c95 100644 --- a/app/views/api/v1/statuses/_media.rabl +++ b/app/views/api/v1/statuses/_media.rabl @@ -3,3 +3,4 @@ attributes :id, :remote_url, :type node(:url) { |media| full_asset_url(media.file.url(:original)) } node(:preview_url) { |media| full_asset_url(media.file.url(:small)) } node(:text_url) { |media| media.local? ? medium_url(media) : nil } +node(:meta) { |media| media.file.meta } \ No newline at end of file -- cgit