class ActiveStorage::Service::MirrorService

def upload(key, io, checksum: nil, **options)

ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError.
whereas the upload to the mirrors is done asynchronously. If a +checksum+ is provided, all services will
Upload the +io+ to the +key+ specified to all services. The upload to the primary service is done synchronously
def upload(key, io, checksum: nil, **options)
  io.rewind
  primary.upload key, io, checksum: checksum, **options
  mirror_later key, checksum: checksum
end