From 1d63005a4d5a1f792620fce757eec182faa180dc Mon Sep 17 00:00:00 2001 From: Brandon Mitchell Date: Fri, 9 Jan 2026 10:43:36 -0500 Subject: [PATCH] Add the upload cancel endpoint Signed-off-by: Brandon Mitchell --- spec.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec.md b/spec.md index 2b72acc..72767c0 100644 --- a/spec.md +++ b/spec.md @@ -426,6 +426,23 @@ The following chunk upload SHOULD use the `` provided in the response. The `` value is the position of the last uploaded byte of the blob. +##### Cancel a blob upload + +During a blob upload, the session may be canceled with a `DELETE` request: + +URL path: `` [end-14](#endpoints) +``` +Content-Length: 0 +``` + +The `` refers to the URL obtained from the preceding `POST` or `PATCH` request. + +If successful, the response SHOULD be a `204 No Content` response code. + +Clients SHOULD send this request when aborting a blob upload, releasing server resources. +Clients SHOULD ignore any failures. +If this request fails or is not called, the server SHOULD eventually timeout unfinished uploads. + ##### Mounting a blob from another repository If a necessary blob exists already in another repository within the same registry, it can be mounted into a different repository via a `POST` @@ -805,6 +822,7 @@ This endpoint MAY be used for authentication/authorization purposes, but this is | end-12a | `GET` | `/v2//referrers/` | `200` | `404`/`400` | | end-12b | `GET` | `/v2//referrers/?artifactType=` | `200` | `404`/`400` | | end-13 | `GET` | `/v2//blobs/uploads/` | `204` | `404` | +| end-14 | `DELETE` | `/v2//blobs/uploads/` | `204` | `404`/`400` | #### Error Codes