upload.saveBigFilePart
Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.
func (c *Client) UploadSaveBigFilePart(ctx context.Context, request *UploadSaveBigFilePartRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.UploadSaveBigFilePart(ctx, &tg.UploadSaveBigFilePartRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
FileID | int64 | yes | Random file id, created by the client |
FilePart | int | yes | Part sequence number |
FileTotalParts | int | yes | Total number of parts |
Bytes | []byte | yes | Binary data, part contents |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | FILE_PARTS_INVALID | The number of file parts is invalid. |
| 400 | FILE_PART_EMPTY | The provided file part is empty. |
| 400 | FILE_PART_INVALID | The file part number is invalid. |
| 400 | FILE_PART_SIZE_CHANGED | Provided file part size has changed. |
| 400 | FILE_PART_SIZE_INVALID | The provided file part size is invalid. |
| 400 | FILE_PART_TOO_BIG | The uploaded file part is too big. |
| 400 | FILE_PART_TOO_SMALL | The size of the uploaded file part is too small, please see the documentation for the allowed sizes. |
References
- Official documentation
- Generated Go reference
- TL definition:
upload.saveBigFilePart#de7b673d