Method: Service::ImageKitIoService#download

Defined in:
lib/active_storage/service/image_kit_io_service.rb

#download(key, &block) ⇒ Object



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/active_storage/service/image_kit_io_service.rb', line 83

def download(key, &block)
  if block_given?
    instrument :stream_file, key: key do
      stream_file(key, &block)
    end
  else
    instrument :download, key: key do
      image_kit_file(key)
    end
  end
end