Resumable upload protocol implementation in Ruby