method

compute_checksum_in_chunks

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: Blob
compute_checksum_in_chunks(io) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activestorage/app/models/active_storage/blob.rb, line 313
    def compute_checksum_in_chunks(io)
      Digest::MD5.new.tap do |checksum|
        while chunk = io.read(5.megabytes)
          checksum << chunk
        end

        io.rewind
      end.base64digest
    end
Register or log in to add new notes.