[英]Azure File Storage URL in browser showing InvalidHeaderValue
[英]Rails 5.2: Active Storage Variants service_url throwing "no such key" error in browser
您需要對變體調用#processed
以便Rails 處理並上傳它。 軌道 v7.0:
has_one_attached :image do |attachable|
attachable.variant :thumb, resize_to_limit: [100, 100]
end
def thumb_url
image.variant(:thumb).processed.url if image.attached?
end
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.