Skip to content

Cancel an upload session

cancelUploadSession

POST /api/v1/uploads/{id}/cancel

Scope: files.writeRate cost: 2

Cancel 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).

Terminal window
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.

NameInTypeRequiredDescription
idpathstringYesThe session’s id.
StatusMeaningBody
204Cancelled.none

Every error is an application/problem+json document (ProblemDetails); branch on its type or code. See Errors.

StatusProblem typesWhen
400invalid-requestInvalid request (invalid-request).
401invalid-tokenInvalid token (invalid-token).
403insufficient-scope
write-not-allowed
One of: Insufficient scope (insufficient-scope); Not allowed for this app (write-not-allowed).
404not-foundNot found (not-found).
409conflictConflict (conflict).
429rate-limitedToo many requests (rate-limited).
500internal-errorInternal error (internal-error).