upload.getCdnFileHashes
Get SHA256 hashes for verifying downloaded CDN files
func (c *Client) UploadGetCDNFileHashes(ctx context.Context, request *UploadGetCDNFileHashesRequest) ([]FileHash, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.UploadGetCDNFileHashes(ctx, &tg.UploadGetCDNFileHashesRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // []FileHash
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
FileToken | []byte | yes | File |
Offset | int64 | yes | Offset from which to start getting hashes |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CDN_METHOD_INVALID | You can't call this method in a CDN DC. |
| 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. |
| 400 | RSA_DECRYPT_FAILED | Internal RSA decryption failed. |
References
- Official documentation
- Generated Go reference
- TL definition:
upload.getCdnFileHashes#91dc3f31