Telegram.BotAPI icon indicating copy to clipboard operation
Telegram.BotAPI copied to clipboard

FileId to InputFile

Open ko-vasilev opened this issue 1 year ago • 1 comments

Hi! I have a certain file already uploaded to Telegram and I have its FileId. Is there a way to initialize the InputFile from it, so that I don't have to download this file myself? In the documentation (for SendAnimation method, for example) it says Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), but I don't see a way to pass the file_id

Edit: Nevermind, there is an overload that accepts a string instead of an InputFile. But to be honest I'd expect there to be a several implementations of an InputFile one of which would accept a file id as constructor parameter

ko-vasilev avatar Mar 05 '24 15:03 ko-vasilev

Hi. The InputFile class object represents the type described in the documentation. It says: This object represents the contents of a file to be uploaded. That's why InputFile is only used when you want to upload new files.

Eptagone avatar Mar 31 '24 23:03 Eptagone