Describes types that can be used as an input to any methods that send media (like TelegramClient.sendPhoto)
Can be one of:
Buffer
File
ReadStream
fs
ReadableStream
Readable
BunFile
Bun.file()
Deno.FsFile
Deno.open()
tl.TypeInputFile
tl.TypeInputMedia
string
file:
file:image.jpg
https://example.com/image.jpg
URL
fetch()
file://
td.RawFullRemoteFileLocation
Describes types that can be used as an input to any methods that send media (like TelegramClient.sendPhoto)
Can be one of:
Buffer, which will be interpreted as raw file contentsFile(from the Web API)ReadStream(for Node.js/Bun, from thefsmodule)ReadableStream(from the Web API, base readable stream)Readable(for Node.js/Bun, base readable stream)BunFile(fromBun.file())Deno.FsFile(fromDeno.open()in Deno)tl.TypeInputFileandtl.TypeInputMediaTL objectsstringwith a path to a local file prepended withfile:(non-browser only) (e.g.file:image.jpg)stringwith a URL to remote files (e.g.https://example.com/image.jpg)stringwith TDLib and Bot API compatible File ID.URL(from the Web API, will befetch()-ed if needed;file://URLs are not available in browsers)td.RawFullRemoteFileLocation(parsed File ID)