You do not have to cancel an upload you stop using: it expires on its own after an hour without a new piece.
Path parameters
| Parameter | Description | |
|---|---|---|
uploadUrlstring |
optional | For DELETE {uploadUrl}: the uploadUrl from Create Upload, used exactly as returned. |
idstring |
optional | For DELETE /v1/uploads/{id}: the upload's id, which starts with upl_. |
Header parameters
| Parameter | Description | |
|---|---|---|
Authorizationstring |
optional | Only for DELETE /v1/uploads/{id}: Bearer API_Key. Never send it to the upload URL. |
Example request
# With the upload URL: no API key curl --request DELETE "$UPLOAD_URL" # With the upload's id and your API key curl --request DELETE 'https://api.cloudfiles.io/v1/uploads/upl_66f3c1a2b4d5e6f708192a3b' \ --header 'Authorization: Bearer API_Key'
Response body
204 No Content, with no body, also when the upload was already cancelled or expired.
Errors
| Status | errorCode | What it means |
|---|---|---|
| 404 | UPLOAD/NOT_FOUND | No upload with this URL or id in your account. |
| 409 | UPLOAD/ALREADY_COMPLETING | The upload is finishing or finished. To remove the file, use Delete File. |
| 403 | COMMON/FORBIDDEN | DELETE /v1/uploads/{id}: the API key is missing or unknown. |