Skip to main content

Upload media

POST 

/media/upload

Request a presigned upload URL for a media file. This is step 1 of the 3-step upload flow:

  1. POST /media/upload — Get a presigned upload URL (this endpoint)
  2. Upload your file to the returned upload_url using the method specified in upload_method
  3. POST /media/{id}/complete — Signal that the upload is finished

Upload methods by type:

  • Images — POST multipart-form to Cloudflare Images (field name: file)
  • Videos — PUT to R2 presigned URL with Content-Type header
  • Documents — PUT to R2 presigned URL with Content-Type header

Request

Responses

Upload URL generated