2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 04:48:06 +00:00

Do not recalculate the md5 sum in case of chunk re-uploads

This commit is contained in:
Dan 2020-10-17 17:07:32 +02:00
parent f3e515a2f2
commit dadb4b4eb6

View File

@ -154,7 +154,7 @@ class SaveFile(Scaffold):
chunk = fp.read(part_size)
if not chunk:
if not is_big:
if not is_big and not is_missing_part:
md5_sum = "".join([hex(i)[2:].zfill(2) for i in md5_sum.digest()])
break
@ -177,7 +177,7 @@ class SaveFile(Scaffold):
if is_missing_part:
return
if not is_big:
if not is_big and not is_missing_part:
md5_sum.update(chunk)
file_part += 1