Module: Shrine::Plugins::RemoteUrl::ClassMethods
- Defined in:
- lib/shrine/plugins/remote_url.rb
Instance Method Summary collapse
-
#remote_url(url, **options) ⇒ Object
Downloads the file using the “down” gem or a custom downloader.
Instance Method Details
#remote_url(url, **options) ⇒ Object
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.
55 56 57 58 59 60 61 |
# File 'lib/shrine/plugins/remote_url.rb', line 55 def remote_url(url, **) = { max_size: opts[:remote_url][:max_size] }.merge() instrument_remote_url(url, ) do download_remote_url(url, ) end end |