Skip to main content

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

NameTypeRequiredDescription
FileIDint64yesRandom file id, created by the client
FilePartintyesPart sequence number
FileTotalPartsintyesTotal number of parts
Bytes[]byteyesBinary data, part contents

Returns

bool

Possible errors

CodeTypeDescription
400FILE_PARTS_INVALIDThe number of file parts is invalid.
400FILE_PART_EMPTYThe provided file part is empty.
400FILE_PART_INVALIDThe file part number is invalid.
400FILE_PART_SIZE_CHANGEDProvided file part size has changed.
400FILE_PART_SIZE_INVALIDThe provided file part size is invalid.
400FILE_PART_TOO_BIGThe uploaded file part is too big.
400FILE_PART_TOO_SMALLThe size of the uploaded file part is too small, please see the documentation for the allowed sizes.

References