Method: ActiveStorage::Downloader#open
- Defined in:
- activestorage/lib/active_storage/downloader.rb
#open(key, checksum: nil, verify: true, name: "ActiveStorage-", tmpdir: nil) ⇒ Object
11 12 13 14 15 16 17 |
# File 'activestorage/lib/active_storage/downloader.rb', line 11 def open(key, checksum: nil, verify: true, name: "ActiveStorage-", tmpdir: nil) open_tempfile(name, tmpdir) do |file| download key, file verify_integrity_of(file, checksum: checksum) if verify yield file end end |