Fix public channel
This commit is contained in:
parent
a9e40a3d80
commit
abb8f5837e
5 changed files with 49 additions and 45 deletions
|
@ -34,26 +34,28 @@ class MediaAttachment < ApplicationRecord
|
|||
image? ? 'image' : 'video'
|
||||
end
|
||||
|
||||
private
|
||||
class << self
|
||||
private
|
||||
|
||||
def self.file_styles(f)
|
||||
if f.instance.image?
|
||||
{
|
||||
original: '100%',
|
||||
small: '510x680>'
|
||||
}
|
||||
else
|
||||
{
|
||||
small: {
|
||||
convert_options: {
|
||||
output: {
|
||||
vf: 'scale=\'min(510\, iw):min(680\, ih)\':force_original_aspect_ratio=decrease'
|
||||
}
|
||||
},
|
||||
format: 'png',
|
||||
time: 1
|
||||
def file_styles(f)
|
||||
if f.instance.image?
|
||||
{
|
||||
original: '100%',
|
||||
small: '510x680>'
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
small: {
|
||||
convert_options: {
|
||||
output: {
|
||||
vf: 'scale=\'min(510\, iw):min(680\, ih)\':force_original_aspect_ratio=decrease'
|
||||
}
|
||||
},
|
||||
format: 'png',
|
||||
time: 1
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue