# town.delve.video.uploadPart

> Published by [delve.town](https://lexicon.garden/identity/did:plc:qzqct2rrq4u2gmy5g3mjxske)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.uploadPart)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.uploadPart/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.uploadPart/examples)

## Definitions

### `town.delve.video.uploadPart`

**Type**: `procedure`

Upload one part. Parts are idempotent and may be retried or re-sent while the session is created. Each expected length is derived from the upload size and part size, and Content-Length must match exactly. ETags are never exposed to clients.

#### Input

**Encoding**: `application/octet-stream`

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `partNumber` | `integer` | Yes |  |
| `sizeBytes` | `integer` | Yes |  |

#### Errors

- **UploadNotFound**: The job ID is unknown or aged out of retention; known terminal sessions are never reported as not found.
- **UploadExpired**: The upload session expired before completion.
- **InvalidPartNumber**: The part number is outside the upload's valid part range.
- **PartSizeMismatch**: Content-Length does not exactly match the expected size for this part.
- **UploadNotReady**: A finish is in progress; check getUploadStatus and retry.
- **UploadFailed**: The session is known to have failed; the error carries its failure reason.
- **UploadAborted**: The session is known to have been aborted.
- **UploadAlreadyCompleted**: The session is known to have already completed.
- **ServiceOverloaded**: The service is draining or temporarily at capacity; retry on another worker.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Upload one part. Parts are idempotent and may be retried or re-sent while the session is created. Each expected length is derived from the upload size and part size, and Content-Length must match exactly. ETags are never exposed to clients.",
      "errors": [
        {
          "description": "The job ID is unknown or aged out of retention; known terminal sessions are never reported as not found.",
          "name": "UploadNotFound"
        },
        {
          "description": "The upload session expired before completion.",
          "name": "UploadExpired"
        },
        {
          "description": "The part number is outside the upload's valid part range.",
          "name": "InvalidPartNumber"
        },
        {
          "description": "Content-Length does not exactly match the expected size for this part.",
          "name": "PartSizeMismatch"
        },
        {
          "description": "A finish is in progress; check getUploadStatus and retry.",
          "name": "UploadNotReady"
        },
        {
          "description": "The session is known to have failed; the error carries its failure reason.",
          "name": "UploadFailed"
        },
        {
          "description": "The session is known to have been aborted.",
          "name": "UploadAborted"
        },
        {
          "description": "The session is known to have already completed.",
          "name": "UploadAlreadyCompleted"
        },
        {
          "description": "The service is draining or temporarily at capacity; retry on another worker.",
          "name": "ServiceOverloaded"
        }
      ],
      "input": {
        "encoding": "application/octet-stream"
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "partNumber": {
              "minimum": 1,
              "type": "integer"
            },
            "sizeBytes": {
              "type": "integer"
            }
          },
          "required": [
            "partNumber",
            "sizeBytes"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "jobId": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "partNumber": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "jobId",
          "partNumber"
        ],
        "type": "params"
      },
      "type": "procedure"
    }
  },
  "id": "town.delve.video.uploadPart",
  "lexicon": 1
}
```
