method

ensure_integrity_of

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: DiskService
ensure_integrity_of(key, checksum) private

No documentation

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

Hide source
# File activestorage/lib/active_storage/service/disk_service.rb, line 163
      def ensure_integrity_of(key, checksum)
        unless OpenSSL::Digest::MD5.file(path_for(key)).base64digest == checksum
          delete key
          raise ActiveStorage::IntegrityError
        end
      end
Register or log in to add new notes.