Progress of upload in percentage
(self)
| 72 | return sum([f.total_bytes_uploaded for f in self.files()]) |
| 73 | |
| 74 | def progress(self): |
| 75 | """ |
| 76 | Progress of upload in percentage |
| 77 | """ |
| 78 | total_bytes = float(self.total_bytes()) |
| 79 | total_bytes_uploaded = float(self.total_bytes_uploaded()) |
| 80 | |
| 81 | if total_bytes == 0 or total_bytes_uploaded == 0: |
| 82 | return 0.0 |
| 83 | |
| 84 | return total_bytes_uploaded / total_bytes |
| 85 | |
| 86 | |
| 87 | def get_connection(self): |
no test coverage detected