Ktor client `onUpload` extension method, is not be...
# ktor
a
Ktor client
onUpload
extension method, is not behaving as intended (at least on JS Browser). It invokes the
onUpload
callback multiple times (until it reaches 100%) before it even starts sending the bytes over the network. Leaving with a very long pause for large files while the bytes are being sent over the network. Is this a bug? if so, how do I file it? github? or YT? Also, has anyone experienced this as well?? If so, how did you work around it?
t
I might be misunderstanding, this seems intentional?
public typealias ProgressListener = suspend (bytesSentTotal: Long, contentLength: Long) -> Unit
This is the callback type which seems intended to be called multiple times
a
a
@Trevor Stone the problem is not it being called multiple times. It should work like that This function should give deliver the current status of an upload as it is being sent over the network. It is not doing that
Thanks @Aleksei Tirman [JB]
a
I’ve left a comment in the issue.
a
Answered your comment
a
Are you able to reproduce it for a non-JS target?