Skip to main content

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

NameTypeRequiredDescription
FileIDint64yesRandom file identifier created by the client
FilePartintyesNumerical order of a part
Bytes[]byteyesBinary data, content of a part

Returns

bool

Possible errors

CodeTypeDescription
400FILE_PART_EMPTYThe provided file part is empty.
400FILE_PART_INVALIDThe file part number is invalid.
400MSG_ID_INVALIDInvalid message ID provided.

References