Skip to content

Development only: upload a file or a part

PUT
/dev/files/{org}/{file}/{part}
curl --request PUT \
--url 'https://api.sloose.com/dev/files/org_9f3c/fil_7c2e/0?ticket=example'

Only where ENVIRONMENT is development, and answers 404 anywhere else: miniflare’s R2 has no S3 endpoint, so the reservation’s upload URLs point here instead. A signed ticket names the file and the part (0 for a single file), so no session is needed and nothing else can be written.

org
required

The organisation id.

string
Example
org_9f3c

The organisation id.

file
required

The file id.

string
Example
fil_7c2e

The file id.

part
required

The part number; 0 for a single file.

string
Example
0

The part number; 0 for a single file.

ticket
required
string

Stored; a part answers its ETag.

The bytes do not match the checksum reserved.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The upload link is not valid.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Not in development, or no such upload.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No multipart upload.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com