Documentation - v0.27.1
    Preparing search index...

    Type Alias UploadFileLike

    UploadFileLike:
        | URL
        | Uint8Array
        | File
        | Blob
        | string
        | IReadable
        | AnyToNever<ReadStream>
        | AnyToNever<ReadableStream<Uint8Array>>
        | AnyToNever<NodeJS.ReadableStream>
        | AnyToNever<Response>

    Describes types that can be used in TelegramClient.uploadFile method. Can be one of:

    • Uint8Array/Buffer, which will be interpreted as raw file contents
    • File, Blob (from the Web API)
    • string, which will be interpreted as file path (non-browser only!)
    • URL (from the Web API, will be fetch()-ed; file:// URLs are not available in browsers)
    • ReadStream (for Node.js/Bun, from the node:fs module)
    • BunFile (from Bun.file())
    • Deno.FsFile (from Deno.open() in Deno)
    • ReadableStream (Web API readable stream)
    • Readable (Node.js/Bun readable stream)
    • Response (from window.fetch)