static int dm_sendFileToOtherMachine_chunkSize = 1024*1024; svoid dm_sendFileToOtherMachine(File f, S computerID, S remotePath) { for (LongRange r : chunks(fileSize(f), dm_sendFileToOtherMachine_chunkSize)) { print("Sending file chunk " + r + " of " + f + " to " + computerID + ":" + remotePath); dm_evalOnOtherMachine(computerID, "saveBinaryFilePart_base64(" + quote(remotePath) + ", " + r.start + "L, " + quote(base64encode(loadBinaryFileChunk(f, r))) + ");"); } }