---
title: "Upload file (with chunked upload support)"
method: POST
path: "/upload/{sid}"
tags: ["Microdata"]
---

# Upload file (with chunked upload support)

`POST /upload/{sid}`

Upload files with support for both normal and chunked uploads. Chunked uploads are useful for large files.

**For normal uploads**: Send file as multipart/form-data with field name 'file'

**For chunked uploads**: Include these headers:
- X-Chunk-Index: Current chunk number (0-based)
- X-Total-Chunks: Total number of chunks
- X-Upload-ID: Unique identifier for this upload
- X-File-Name: Original filename
- X-File-Size: Total file size in bytes
- X-Is-Final-Chunk: 1 for final chunk, 0 otherwise

Send each chunk as multipart/form-data with field name 'chunk'

## Path parameters

- `sid` string, required

## Headers

- `X-Chunk-Index` integer
- `X-Total-Chunks` integer
- `X-Upload-ID` string
- `X-File-Name` string
- `X-File-Size` integer
- `X-Is-Final-Chunk` integer

## Response `200`

File uploaded successfully (or chunk received for chunked uploads)

- object
  - `status` 'success' | 'chunk_received'
  - `upload_method` 'normal' | 'chunked'
  - `upload_id` string
  - `file_name` string
  - `file_path` string
  - `file_size` integer
  - `file_type` string
  - `chunk_index` integer
  - `chunks_received` integer
  - `total_chunks` integer
  - `percent_complete` number
  - `message` string

## Other responses

- `400` — Bad request - project not found, no file uploaded, or upload failed

---

[API](https://skmtc.net/worldbank/apis/metadata-editor-api.md) · [All operations](https://skmtc.net/worldbank/apis/metadata-editor-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/worldbank/metadata-editor-api/revisions/f4c8258bab5a/schema)
