class Rack::Test::UploadedFile
def append_to(buffer)
after to make sure all data in tempfile is appended to the
copies of file data in memory. Rewind tempfile before and
Append to given buffer in 64K chunks to avoid multiple large
def append_to(buffer) tempfile.rewind buf = String.new buffer << tempfile.readpartial(65_536, buf) until tempfile.eof? tempfile.rewind nil end