Object

Initialize media upload

Changed on

Starts a pending single-file media upload. The API infers the media object type from fileType and fileName.

<br>

Rate limit: 20 requests per 60 seconds

post/object/media/upload

Request

  • Base URL
    https://api.capacities.io
  • Auth
    HTTP bearer

Request body

object required
fileName, string required

Original file name, including extension when available.

fileSize, integer required

File size in bytes.

fileType, string

MIME type, e.g. image/png.

title, string

Optional object title. Defaults to file name.

collections, string[]

Collection ids to assign. Pass an empty array to use the default collection for this structure.

Response

200 OK

object required
id, string uuid required

Reserved object id that will be used when the upload completes.

status, 'pending' required
fileName, string required
fileType, string required
fileSize, integer required
partSize, integer required

Required part size in bytes, except for the final part.

partCount, integer required
expiresAt, string date-time required

ISO 8601 datetime when this pending upload session expires.

Changes

    • info

      the expiresAt response's property pattern was changed from ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ to ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ for the status

    • info

      endpoint added