module ActiveStorage::Downloading

def download_blob_to(file) #:doc:

:doc:
Efficiently downloads blob data into the given file.
def download_blob_to(file) #:doc:
  file.binmode
  blob.download { |chunk| file.write(chunk) }
  file.flush
  file.rewind
end