instance method
download_blob_to
Ruby on Rails 5.2.8.1
Since v5.2.8.1 Last seen in v6.0.6 PrivateAvailable in: v5.2.8.1 v6.0.6
Signature
download_blob_to(file)
Efficiently downloads blob data into the given file.
Parameters
-
filereq
Source
# File activestorage/lib/active_storage/downloading.rb, line 27
def download_blob_to(file) #:doc:
file.binmode
blob.download { |chunk| file.write(chunk) }
file.flush
file.rewind
end
Defined in activestorage/lib/active_storage/downloading.rb line 27
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Downloading