module Shrine::Plugins::RemoteUrl::ClassMethods

  1. lib/shrine/plugins/remote_url.rb

Methods

Public Instance

  1. remote_url

Public Instance methods

remote_url(url, **options)

Downloads the file using the “down” gem or a custom downloader. Checks the file size and terminates the download early if the file is too big.

[show source]
   # File lib/shrine/plugins/remote_url.rb
55 def remote_url(url, **options)
56   options = { max_size: opts[:remote_url][:max_size] }.merge(options)
57 
58   instrument_remote_url(url, options) do
59     download_remote_url(url, options)
60   end
61 end