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)) dm_evalOnOtherMachine(computerID, "saveBinaryFilePart_base64(" + quote(remotePath) + ", " + r.start + ", " + quote(base64encode(loadBinaryFileChunk(f, r))) + ");"); }