---
updatedAt: 2026-07-30T11:04:13.000Z
agentTools:
  projectIndex: https://developer.orangelogic.com/llms.txt
---

# Step 4: Upload each asset chunk

Use one API call per asset chunk to upload all chunks to Orange Logic

Use this call to upload each asset chunk. You need to know each chunk’s starting and ending position to use this call, as well as the total length of the asset the chunk is part of.

This page shows the <span style="color:#0171C2">**POST**</span> method, but you can also use <span style="color:#0E9B71">**GET**</span>.

## Response

Nothing is returned.

## Example calls

These example calls upload two sequential asset chunks.

[block:html]
{
  "html": "<details>\n  <summary><strong>Example call 1: An asset's first chunk</strong></summary>\n  <pre>\n  <code>\n curl -X 'POST' \\\n  'https://mangovations.orangelogic.com/webapi/mediafile/import/upload/item/26_v1/2RBKM47GUMWY?start=0&end=26214399&totalLength=85997454' \\\n  -H 'accept: */*' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'data=@xaa'\n  </code>\n  </pre>\n</details>"
}
[/block]

<br />

[block:html]
{
  "html": "<details>\n  <summary><strong>Example call 2: An asset's second chunk</strong></summary>\n  <pre>\n  <code>\n curl -X 'POST' \\\n  'https://mangovations.orangelogic.com/webapi/mediafile/import/upload/item/26_v1/2RBKM47GUMWY?start=26214400&end=52428799&totalLength=85997454' \\\n  -H 'accept: */*' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'data=@xab'\n  </code>\n  </pre>\n</details>"
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "multi-part-upload-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{OrangeLogicURL}/webapi/mediafile/import/upload/",
      "variables": {
        "OrangeLogicURL": {
          "default": "OrangeLogicURL"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/item/26_v1/{uploadItemId}": {
      "post": {
        "summary": "Step 4: Upload each asset chunk",
        "description": "Use one API call per asset chunk to upload all chunks to Orange Logic",
        "operationId": "upload-chunks-to-orange-logic",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "The <code>multipart/form-data</code> header parameter is required for this call.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "multipart-formdata"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "uploadItemID"
                ],
                "properties": {
                  "uploadItemID": {
                    "type": "string",
                    "description": "<code>uploadItemId</code> or <code>UIRecordID</code> of the upload item created in the <a href= \"https://developer.orangelogic.com/reference/register-upload-assets\">Register upload assets</a> section. Use this ID to identify the file chunk uploaded with this call as part of its parent asset."
                  },
                  "start": {
                    "type": "integer",
                    "description": "Starting position (in bytes) of the chunk. Must be a <code>multiple of 131072</code> (for example, 131072, 262144, etc.).",
                    "format": "int32"
                  },
                  "end": {
                    "type": "integer",
                    "description": "Ending position (in bytes) of the chunk (inclusive). Must be: <code>(multiple of 131072) - 1</code> (for example, 131071, 262143...), except for the last chunk of the file. For the last chunk of the file, this value is the total asset length - 1.",
                    "format": "int32"
                  },
                  "totalLength": {
                    "type": "integer",
                    "description": "Size of the full asset in bytes.",
                    "format": "int32"
                  },
                  "md5": {
                    "type": "string",
                    "description": "Md5 hash of the chunk."
                  },
                  "partNumber": {
                    "type": "integer",
                    "description": "1-base part number for cloud upload, required if using cloud buffer bucket.",
                    "default": 1,
                    "format": "int32"
                  },
                  "data": {
                    "type": "string",
                    "description": "File chunk.",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```