Development only: upload a file or a part
const url = 'https://api.sloose.com/dev/files/org_9f3c/fil_7c2e/0?ticket=example';const options = {method: 'PUT'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation id.
Example
org_9f3cThe organisation id.
The file id.
Example
fil_7c2eThe file id.
The part number; 0 for a single file.
Example
0The part number; 0 for a single file.
Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Stored; a part answers its ETag.
The bytes do not match the checksum reserved.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The upload link is not valid.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}Not in development, or no such upload.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No multipart upload.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
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.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).