Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DownloadMediaInterface

All of these are optional and will be calculated automatically if not specified.

Hierarchy

  • DownloadMediaInterface

Index

Properties

outputFile?: OutFile

The output file location, if left undefined this method will return a buffer

thumb?: number | TypePhotoSize

Which thumbnail size from the document or photo to download, instead of downloading the document or photo itself.

If it's specified but the file does not have a thumbnail, this method will return undefined.

The parameter should be an integer index between 0 and sizes.length.
0 will download the smallest thumbnail, and sizes.length - 1 will download the largest thumbnail.

You can also pass the Api.PhotoSize instance to use. Alternatively, the thumb size type string may be used.

In short, use thumb=0 if you want the smallest thumbnail and thumb=sizes.length if you want the largest thumbnail.

progressCallback?: ProgressCallback

A callback function accepting two parameters: (received bytes, total).

Generated using TypeDoc