---
title: "Complete multipart upload"
method: POST
path: "/uploads/complete-multipart.json"
tags: ["Uploads"]
---

# Complete multipart upload

`POST /uploads/complete-multipart.json`

Completes the multipart upload in the external store, and copies the
file from its temporary location to its final location in the store.
All of the parts must have been uploaded to the external storage provider.
An Upload record will be completed in most cases once the file is copied
to its final location.

You must have the correct permissions and CORS settings configured in your
external provider. We support AWS S3 as the default. See:

https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4.

An external file store must be set up and `enable_direct_s3_uploads` must
be set to true for this endpoint to function.

## Request body

- object
  - `unique_identifier` string, required — The unique identifier returned in the original /create-multipart request.
  - `parts` unknown[], required — All of the part numbers and their corresponding ETags that have been uploaded must be provided.
    - unknown

## Response `200`

external upload initialized

- object
  - `id` integer, required
  - `url` string, required
  - `original_filename` string, required
  - `filesize` integer, required
  - `width` integer, required
  - `height` integer, required
  - `thumbnail_width` integer, required
  - `thumbnail_height` integer, required
  - `extension` string, required
  - `short_url` string, required
  - `short_path` string, required
  - `retain_hours` string, nullable, required
  - `human_filesize` string, required
  - `dominant_color` string, nullable
  - `thumbnail` object, nullable
    - `id` integer
    - `upload_id` integer
    - `url` string
    - `extension` string
    - `width` integer
    - `height` integer
    - `filesize` integer
  - `optimized_video` object, nullable
    - `id` integer
    - `upload_id` integer
    - `url` string
    - `extension` string
    - `filesize` integer
    - `sha1` string
    - `original_filename` string

---

[API](https://skmtc.dev/discourse/apis/discourse-api-documentation.md) · [All operations](https://skmtc.dev/discourse/apis/discourse-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/discourse/discourse-api-documentation/revisions/2fd8fd2d6fd0/schema)
