---
title: "Creates a multipart external upload"
method: POST
path: "/uploads/create-multipart.json"
tags: ["Uploads"]
---

# Creates a multipart external upload

`POST /uploads/create-multipart.json`

Creates a multipart upload in the external storage provider, storing
a temporary reference to the external upload similar to /get-presigned-put.

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
  - `upload_type` 'avatar' | 'profile_background' | 'card_background' | 'custom_emoji' | 'composer', required
  - `file_name` string, required
  - `file_size` integer, required — File size should be represented in bytes.
  - `metadata` object
    - `sha1-checksum` string — The SHA1 checksum of the upload binary blob. Optionally be provided and serves as an additional security check when later processing the file in complete-external-upload endpoint.

## Response `200`

external upload initialized

- object
  - `key` string, required — The path of the temporary file on the external storage service.
  - `external_upload_identifier` string, required — The identifier of the multipart upload in the external storage provider. This is the multipart upload_id in AWS S3.
  - `unique_identifier` string, required — A unique string that identifies the external upload. This must be stored and then sent in the /complete-multipart and /batch-presign-multipart-parts endpoints.

---

[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)
