method

compute_checksum_in_chunks

Importance_0
v7.0.0 - 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 369
    def compute_checksum_in_chunks(io)
      OpenSSL::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.