mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Return a custom class for sized InputFile instead extra attrs
This commit is contained in:
9
telethon/tl/custom/input_sized_file.py
Normal file
9
telethon/tl/custom/input_sized_file.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from ..types import InputFile
|
||||
|
||||
|
||||
class InputSizedFile(InputFile):
|
||||
"""InputFile class with two extra parameters: md5 (digest) and size"""
|
||||
def __init__(self, id_, parts, name, md5, size):
|
||||
super().__init__(id_, parts, name, md5.hexdigest())
|
||||
self.md5 = md5.digest()
|
||||
self.size = size
|
Reference in New Issue
Block a user