telegram-upload
telegram-upload copied to clipboard
Telegram premium
What do you know about telegram premium and his 4gb file size?
today, telegram have already release the premium function.
This change is necessary to support 4GB files uploaded by premium accounts. Basiclly, premium accounts have x2 quota to compare the free account
such as MAX_FILE_SIZE
and CAPTION_MAX_LENGTH
become 4GB
and 2048
According tg doc, User class have add one more parameter, is_premium True Optional. True, if this user is a Telegram Premium user
ref: https://core.telegram.org/bots/api#user
@simonlkch To get the premium upload working with increased limits , we just change the MAX_FILE_SIZE & CAPTION_MAX_LENGTH in files.py here or need to do some other changes as well ?
i dont know how to debug the code. but the concept is right. one more step for checking the user is_premium flag.
I check the source code, this project is using telethon, in telethon documention, The User Class don't have the is_premium flag. Maybe need telethon to update their library first.
https://docs.telethon.dev/en/stable/quick-references/client-reference.html#users
@simonlkch thanks for info
I found this on a channel , so going by this if the is_premium flag is only for indentification by bots . It shouldn't really affect us in the uploads i guess ? ( Just guessing i could be very well wrong )
just test it, telethon have set the file size limit, so need wait telethon to upgrade
https://github.com/LonamiWebs/Telethon/blob/dd51aea4db90fd255a14e27192e221c70b45e105/telethon/_misc/utils.py#L1057
@simonlkch Can't we just easily fork & edit that condition & then install our own version of telethon ?
pip3 install -U https://github.com/$username/telethon/archive/master.zip
Also on being asked that the premium flag is missing in telethon official group , they replied this - "because premium is implemented in a layer newer than the layer the docs are written for"
never say never, you can modify and try it
never say never, you can modify and try it
Yes indeed , thanks to all people who helped me, it should be working fine now in my fork , here it is if you need -
pip install https://github.com/xd003/tg/archive/master.zip
Just make sure to uninstall telethon before installing
This is safe? Do you fix the new format of url private channels/groups error?
This is safe? Do you fix the new format of url private channels/groups error?
ID works so using that , dunno about invite url
@simonlkch Can't we just easily fork & edit that condition & then install our own version of telethon ?
pip3 install -U https://github.com/$username/telethon/archive/master.zip
Also on being asked that the premium flag is missing in telethon official group , they replied this - "because premium is implemented in a layer newer than the layer the docs are written for"
Thats means install yoru version of the module?
Thats means install yoru version of the module?
yes
Thats means install yoru version of the module?
yes
It didn't work for me, I hope Neko updates the official version
never say never, you can modify and try it
Yes indeed , thanks to all people who helped me, it should be working fine now in my fork , here it is if you need -
pip install https://github.com/xd003/tg/archive/master.zip
Just make sure to uninstall telethon before installing
Thanks, It works for me.
Thank you very much, now I can upload files up to 4GB. TY sir.
Fixed in version v0.7.0.