mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 08:18:18 +08:00
9ab1fb7dfc
Previously we used width and height for thumbnails, new code ensures 1. We auto correct width and height 2. We added extra columns for thumbnail_width and height, this is determined by actual upload and no longer passed in as a side effect 3. Optimized Image now stores filesize which can be used for analysis, decisions Also - fixes Android image manifest as a side effect - fixes issue where a thumbnail generated that is smaller than the upload is no longer used
14 lines
328 B
Ruby
14 lines
328 B
Ruby
class UploadSerializer < ApplicationSerializer
|
|
attributes :id,
|
|
:url,
|
|
:original_filename,
|
|
:filesize,
|
|
:width,
|
|
:height,
|
|
:thumbnail_width,
|
|
:thumbnail_height,
|
|
:extension,
|
|
:short_url,
|
|
:retain_hours
|
|
end
|