upload.saveFilePart
Saves a part of file for further sending to one of the methods.
func (c *Client) UploadSaveFilePart(ctx context.Context, request *UploadSaveFilePartRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.UploadSaveFilePart(ctx, &tg.UploadSaveFilePartRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
FileID | int64 | yes | Random file identifier created by the client |
FilePart | int | yes | Numerical order of a part |
Bytes | []byte | yes | Binary data, content of a part |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | FILE_PART_EMPTY | The provided file part is empty. |
| 400 | FILE_PART_INVALID | The file part number is invalid. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
References
- Official documentation
- Generated Go reference
- TL definition:
upload.saveFilePart#b304a621