ragzy15/PublisherKit

Track progress in uploadTaskPKPublisher

mesheilah opened this issue · 3 comments

in uploadTaskPKPublisher how to track progress through the publisher instead of relying on the URLSessionTaskDelegate's method: urlSession(_ session: task: didSendBodyData bytesSent: totalBytesSent:totalBytesExpectedToSend:) ?

@mesheilah Thanks for highlighting this, currently it is not available but I am working on adding Progress of task as well as Waiting for Task for all URLSession publishers and will adding this in a day or two max.

you're welcome, can't wait to see how will that going to be implemented, basically I guess it would need a separate publisher to emit progress of sent bytes.

@mesheilah Thanks for highlighting this, currently it is not available but I am working on adding Progress of task as well as Waiting for Task for all URLSession publishers and will adding this in a day to two max

Hi @mesheilah You can track the progress of this enhancement in branch feature/progress_waiting_task, currently I am relying on observing the properties of URLSessionTask for progress. For upload progress it might not be very accurate as countOfBytesSent property does not track the request header size. If you have any suggestions, please feel free to mention.