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 thefs
module)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.TypeInputFile
andtl.TypeInputMedia
TL objectsstring
with a path to a local file prepended withfile:
(non-browser only) (e.g.file:image.jpg
)string
with a URL to remote files (e.g.https://example.com/image.jpg
)string
with 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)