Christopher Mederos
02/16/2024, 12:25 AMInputProvider() {inputStream.asInput()}
in a MultiPartFormDataContent body.
Is there a way to handle the stream on the server immediately (such as piping to a file or other storage service) instead of waiting for the client to finish sending the data entirely?
My initial attempt was to use call.receiveMultipart()
and then invoke `part.streamProvider().buffered().use { //etc }`on the FileItem part. However, it seems like the call.ReceiveMultipart() waits for an entire part to be received before doing any processing on it (such as within a multipartData.forEachPart {} block)Aleksei Tirman [JB]
02/16/2024, 7:42 AMFileItem.provider
method returns a ByteReadChannel
, so the part's body isn't entirely read upon receipt.Christopher Mederos
02/17/2024, 5:49 AM