method
stream
rails latest stable - Class:
ActiveStorage::Service::DiskService
stream(key)private
No documentation available.
# File activestorage/lib/active_storage/service/disk_service.rb, line 145
def stream(key)
File.open(path_for(key), "rb") do |file|
while data = file.read(5.megabytes)
yield data
end
end
rescue Errno::ENOENT
raise ActiveStorage::FileNotFoundError
end