How to get status of uploading file using HttpRequest.sendStream()?
I wrote a function whose uploading file to a cloud service. It works well, but I can't figure out how to check the progress of uploading file.
suspend fun uploadFile(path: Path) {
...
val asyncFile: AsyncFile = awaitResult { fs.open(path.toString(), OpenOptions(), it) }
val methodType: HttpMethod = when (link.method.toLowerCase()) {
"put" -> HttpMethod.PUT
"post" ->
HttpMethod.POST
else -> throw UnsupportedOperationException("Method is not supported")...