mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Do not recalculate the md5 sum in case of chunk re-uploads
This commit is contained in:
parent
f3e515a2f2
commit
dadb4b4eb6
@ -154,7 +154,7 @@ class SaveFile(Scaffold):
|
|||||||
chunk = fp.read(part_size)
|
chunk = fp.read(part_size)
|
||||||
|
|
||||||
if not chunk:
|
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()])
|
md5_sum = "".join([hex(i)[2:].zfill(2) for i in md5_sum.digest()])
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ class SaveFile(Scaffold):
|
|||||||
if is_missing_part:
|
if is_missing_part:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not is_big:
|
if not is_big and not is_missing_part:
|
||||||
md5_sum.update(chunk)
|
md5_sum.update(chunk)
|
||||||
|
|
||||||
file_part += 1
|
file_part += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user