napperley
08/18/2022, 3:03 AMTóth István Zoltán
08/18/2022, 4:19 AMval bytes = ByteArray(length)
call.receiveChannel().readFully(bytes, 0, length)
This reads everything into a byte array which is fine if your upload limit is small. You can use the channel to read chunks if the upload is bigger.
Taken this example from: https://github.com/spxbhuhb/zakadabar-stack/blob/master/lib/blobs/src/jvmMain/kotlin/zakadabar/lib/blobs/business/BlobBlBase.ktnapperley
08/18/2022, 5:12 AMAleksei Tirman [JB]
08/18/2022, 6:49 AM