upload.reuploadCdnFile
Request a reupload of a certain file to a CDN DC.
func (c *Client) UploadReuploadCDNFile(ctx context.Context, request *UploadReuploadCDNFileRequest) ([]FileHash, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.UploadReuploadCDNFile(ctx, &tg.UploadReuploadCDNFileRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // []FileHash
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
FileToken | []byte | yes | File token |
RequestToken | []byte | yes | Request token |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CDN_METHOD_INVALID | You can't call this method in a CDN DC. |
| 500 | CDN_UPLOAD_TIMEOUT | A server-side timeout occurred while reuploading the file to the 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 | LOCATION_INVALID | The provided location is invalid. |
| 400 | REQUEST_TOKEN_INVALID | The master DC did not accept the request_token from the CDN DC. 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.reuploadCdnFile#9b2754a8