mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix ActiveStorage::Preview#download method doc [ci-skip]
Follow-up to #42742.
This commit is contained in:
parent
990bcac6f8
commit
acfadacb07
1 changed files with 5 additions and 7 deletions
|
@ -75,13 +75,11 @@ class ActiveStorage::Preview
|
|||
end
|
||||
end
|
||||
|
||||
# Downloads the file associated with this preview's variant.
|
||||
# Raises ActiveStorage::Preview::UnprocessedError if the preview has not been processed yet.
|
||||
#
|
||||
# Downloads the file associated with this variant. If no block is given, the
|
||||
# entire file is read into memory and returned. That'll use a lot of RAM for
|
||||
# very large files. If a block is given, then the download is streamed and
|
||||
# yielded in chunks.
|
||||
# Downloads the file associated with this preview's variant. If no block is
|
||||
# given, the entire file is read into memory and returned. That'll use a lot
|
||||
# of RAM for very large files. If a block is given, then the download is
|
||||
# streamed and yielded in chunks. Raises ActiveStorage::Preview::UnprocessedError
|
||||
# if the preview has not been processed yet.
|
||||
def download(&block)
|
||||
if processed?
|
||||
variant.download(&block)
|
||||
|
|
Loading…
Reference in a new issue