Cancel an upload session
cancelUploadSession
POST /api/v1/uploads/{id}/cancel
Scope:
files.writeRate cost: 2Cancel an upload session that has not been completed
Removes the empty placeholder some storage keeps for the upload; never a file with bytes in it. A completed session cannot be cancelled (409).
Request
Section titled “Request”curl -X POST "$FOLDR/api/v1/uploads/$ID/cancel" \ -H "Authorization: Bearer $TOKEN"$FOLDR is your site’s address (for example https://files.example.com) and $TOKEN is an access token. See Getting access.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The session’s id. |
Responses
Section titled “Responses”| Status | Meaning | Body |
|---|---|---|
| 204 | Cancelled. | none |
Errors
Section titled “Errors”Every error is an application/problem+json document (ProblemDetails); branch on its type or code. See Errors.
| Status | Problem types | When |
|---|---|---|
| 400 | invalid-request | Invalid request (invalid-request). |
| 401 | invalid-token | Invalid token (invalid-token). |
| 403 | insufficient-scopewrite-not-allowed | One of: Insufficient scope (insufficient-scope); Not allowed for this app (write-not-allowed). |
| 404 | not-found | Not found (not-found). |
| 409 | conflict | Conflict (conflict). |
| 429 | rate-limited | Too many requests (rate-limited). |
| 500 | internal-error | Internal error (internal-error). |