tessera

Hands out a URL to write one part straight to the store.

GET
/api/v1/uploads/{id}/parts/{number}

Why

Every byte of a PATCH crosses this server twice, in from the uploader and out to the bucket, and on a self-hosted instance both often share one uplink. A part written directly to the store crosses it zero times.

What it does not check

The part's size. The URL signs the part number and upload id, but not a length: object_store refuses to sign content-length. So a client can write a part of any size, which is only caught when complete asks the store how large the object came out. See [complete].

Errors

404 when there is no such session or no such part, 409 when this upload cannot take parts directly, 410 when the session was abandoned.

cookietessera_session<token>

Set by POST /auth/login. A browser sends it automatically; it is HttpOnly, so page scripts cannot read or set it.

id*string

The session

number*integer

Which part, from one

Formatint64
Range0 <= value

Response Body

Where to PUT that part

application/json
  1. response

A URL to write one part of an upload to the store directly.

expires_at*string

When the URL stops working, RFC 3339.

url*string

Where to PUT the part's bytes. The response carries an ETag header, which complete needs back.

curl -X GET 'https://example.com/api/v1/uploads/string/parts/0'
{  "expires_at": "string",  "url": "string"}