gramjs
gramjs copied to clipboard
Parameters start, end removed from downloadMedia and downloadFile
I see that Parameters start, end are removed from downloadMedia and downloadFile in 2.7.x version (I am not sure if in all 2.x versions is the same). How can I download only one little portion of a file (for streaming, byte range purposes)?
You now have to use client.iterDownload for that, it's a generator that has a offset and limit params
Sorry for my ignorance, do you have an example? or any link to docs explaining that? Because I don't see any method iterDownload or similar on TelegramClient neither Telegram.client.downloads, etc.
I see, iterDownload is a internal function in client/downloads.js. How is supposed to use that funciton in my code? I really don't understand why start and end parameters was removed. What is the reason?