RaphielGang / Telegram-Paperplane

The Paperplane userbot project - a Telegram userbot helping to improve your Telegram experience. https://t.me/tgpaperplane
Other
292 stars 1.05k forks source link

userbot: modules: rewrite gdrive upload #161

Closed rupansh closed 5 years ago

rupansh commented 5 years ago

Handling files in memory is faster, improve code where i found it to be cancer. Might add a check for memory idk

rupansh commented 5 years ago

@baalajimaestro merge vro

baalajimaestro commented 5 years ago

Well, test what happens if I wanna mirror a 8GB file with just 1GB ram.

rupansh commented 5 years ago

Well, test what happens if I wanna mirror a 8GB file with just 1GB ram.

Pretty sure tg doesn't allow you to upload 8GB file

raphielscape commented 5 years ago

Well, test what happens if I wanna mirror a 8GB file with just 1GB ram.

Pretty sure tg doesn't allow you to upload 8GB file

You can make it throw the link instead in case the file size is more than 1 GB

rupansh commented 5 years ago

Well, test what happens if I wanna mirror a 8GB file with just 1GB ram.

Pretty sure tg doesn't allow you to upload 8GB file

You can make it throw the link instead in case the file size is more than 1 GB

Read the code. Downloads through urls are done in disk. Downloads through tg are done in memory with memory checks. It falls back to downloading to disk if enough memory isn't available.