v3

latestOpenAPI 3.1.0MIT2026-07-31930688.4 KB
Uploads

Creates a multipart external upload

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.

post/uploads/create-multipart.json

Request body

upload_type'avatar' | 'profile_background' | 'card_background' | 'custom_emoji' | 'composer' required
file_namestring required
file_sizeinteger required

File size should be represented in bytes.

Example request

{
  "file_name": "IMG_2021.jpeg",
  "file_size": 4096
}

Response

external upload initialized

keystring required

The path of the temporary file on the external storage service.

external_upload_identifierstring required

The identifier of the multipart upload in the external storage provider. This is the multipart upload_id in AWS S3.

unique_identifierstring 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.

Example response

{
  "key": "temp/site/uploads/default/12345/67890.jpg",
  "external_upload_identifier": "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ",
  "unique_identifier": "66e86218-80d9-4bda-b4d5-2b6def968705"
}