Jose A.
post { val targetChannel = FileOutputStream(Files.createTempFile("job-", ".json").toFile()).channel val originChannel = newChannel(call.receiveStream()) originChannel.use { targetChannel.use { targetChannel.transferFrom(originChannel, 0L, 100000) } } ...
receiveChannel()
Aleksei Tirman [JB]
ByteWriteChannel
post { val tmpFile = Files.createTempFile("job-", ".json").toFile() call.receiveChannel().copyTo(tmpFile.writeChannel()) }
call.receiveChannel().copyAndClose(tmpFile.writeChannel())
A modern programming language that makes developers happier.