Skip to main content

POST v1/Upload-Session/Append

POST
https://api.subworkflow.ai/v1/upload-session/append

Upload parts to an existing Multipart Upload Session.

Summary

  • Please ensure you've read this upload sessions readme.md before continuing.
  • After splitting up the original file into "parts" (aka "chunks"), use this endpoint repeatedly to upload the parts, ideally in sequential order.
  • Parts should be a minimum of 5mb unless it's the last part which can be less than 5mb. Maximum part size is 100mb though this is not recommended.
  • Higher part and concurrency settings are only recommended for users with strong internet/network bandwidth.
  • Each append call response will contain an etag and partNumber value. You'll need to keep these and submit them together at the end to complete the upload session.

Parameters

nametypelocationrequireddescription
content-typestringheaderrequiredYou must set the request content type to multipart/form-data
keystringbodyrequiredThe identifier for the upload session. This is obtained from the initial /start request.
partNumberstringbodyrequiredThe part number for the provided data chunk
fileBlobbodyrequiredThe provided data chunk. Cannot be less than 5mb unless it's the last part. Each part be any size between 5mb - 100mb. A larger part size may work better for users with good internet connections.

Responses

{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"data": {
"type": "object",
"properties": {
"etag": {
"type": "string"
},
"partNumber": {
"type": "number"
}
}
}
}
}

Example

curl -X POST https://api.subworkfow.ai/v1/upload-session/append \
--header 'x-api-key: <YOUR-API-KEY>' \
--header 'Content-Type: multipart/form-data' \
--form "key=tmp_xMX0GRh5Ifa3VrY7" \
--form "partNumber=1" \
--form "@file=chunk"
{
"success": true,
"data": {
"etag": "33a64df551425fcc55e4d42a148795d9f25f89d4",
"partNumber": 1
}
}