How to use URL class to know how many bytes is uploaded?

Hi, all
How are you?
I make use of URL class to do uploading. This uploading process is invisible now. I am going to add a progress bar to indicate how many bytes or percentage has been uploaded in my GUI. Could you please tell me how to acheive this by making use of URL class.

Cheers!
Chengyu