upload.getCdnFile
Download a CDN file.
func (c *Client) UploadGetCDNFile(ctx context.Context, request *UploadGetCDNFileRequest) (UploadCDNFileClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.UploadGetCDNFile(ctx, &tg.UploadGetCDNFileRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UploadCDNFileClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
FileToken | []byte | yes | File token |
Offset | int64 | yes | Offset of chunk to download |
Limit | int | yes | Length of chunk to download |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | FILE_TOKEN_INVALID | The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile. |
| 404 | METHOD_INVALID | The specified method is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
upload.getCdnFile#395f69da