'Progress of upload in percentage'

def progress(self):

    total_bytes = float(self.total_bytes())
    total_bytes_uploaded = float(self.total_bytes_uploaded())
    if ((total_bytes == 0) or (total_bytes_uploaded == 0)):
        return 0.0
    return (total_bytes_uploaded / total_bytes)
