TsgcHTTP_API_OpenAI › Methods › AddUploadPart
Uploads one part of a previously created multipart upload session
function AddUploadPart(const aUploadId, aFilename: string) : TsgcOpenAIClass_Response_UploadPart;
| Name | Type | Description |
|---|---|---|
aUploadId | const string | Identifier of the upload session returned by CreateUpload |
aFilename | const string | Local file name containing the chunk bytes to send as this part |
Part metadata including the part id to be referenced on completion (TsgcOpenAIClass_Response_UploadPart)
Calls the POST /v1/uploads/{upload_id}/parts endpoint with a multipart/form-data body. Each part may be up to 64MB and parts can be added in any order, but all parts must be uploaded before calling CompleteUpload. Keep each returned part id and pass them, in sequence, to CompleteUpload to assemble the final file.
oResponse := oAPI.AddUploadPart(vUploadId, 'C:\chunks\part01.bin');
vPartIds.Add(oResponse.Id);