module QiniuRails::Variant
Public Instance Methods
key()
click to toggle source
# File lib/qiniu_rails/variant.rb, line 3 def key "#{blob.key}" end
mode_1()
click to toggle source
# File lib/qiniu_rails/variant.rb, line 7 def mode_1 h, w = variation.transformations.fetch(:resize, '35x35').split('x') "imageView2/1/w/#{w}/h/#{h}" end
service_url(expires_in: service.url_expires_in, disposition: :inline)
click to toggle source
# File lib/qiniu_rails/variant.rb, line 12 def service_url(expires_in: service.url_expires_in, disposition: :inline) service.url key, fop: mode_1, expires_in: expires_in, disposition: disposition, filename: filename, content_type: content_type end