Progress Bar

I am uploading zip files through a custom interface. I would like to make a progress bar update but I cannot find a way to do it. I know the file size so if I can know the bytes transfered I could do a calculation on that.

Also, now that I am thinking about it. Is there a way to get the current transfer rates, like the ones in the SmartFTP client?