Skip to content

Commit aeb5587

Browse files
committed
Reorder monolithic blob uploads
Signed-off-by: Jon Johnson <[email protected]>
1 parent e734841 commit aeb5587

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

spec.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -197,34 +197,8 @@ There are two ways to push blobs: chunked or monolithic.
197197
##### Pushing a blob monolithically
198198

199199
There are two ways to push a blob monolithically:
200-
1. A single `POST` request
201-
2. A `POST` request followed by a `PUT` request
202-
203-
---
204-
205-
To push a blob monolithically by using a single POST request, perform a `POST` request to a URL in the following form, and with the following headers and body:
206-
207-
`/v2/<name>/blobs/uploads/?digest=<digest>` <sup>[end-4b](#endpoints)</sup>
208-
```
209-
Content-Length: <length>
210-
Content-Type: application/octet-stream
211-
```
212-
```
213-
<upload byte stream>
214-
```
215-
216-
Here, `<name>` is the repository's namespace, `<digest>` is the blob's digest, and `<length>` is the size (in bytes) of the blob.
217-
218-
The `Content-Length` header MUST match the blob's actual content length. Likewise, the `<digest>` MUST match the blob's digest.
219-
220-
Successful completion of the request MUST return either a `201 Created` or a `202 Accepted`, and MUST include the following header:
221-
222-
```
223-
Location: <blob-location>
224-
```
225-
226-
Here, `<blob-location>` is a pullable blob URL. This location does not necessarily have to be served by your register, for example, in the case of a signed URL from
227-
some cloud storage provider that your registry generates.
200+
1. A `POST` request followed by a `PUT` request
201+
2. A single `POST` request
228202

229203
---
230204

@@ -270,6 +244,33 @@ Location: <blob-location>
270244

271245
With `<blob-location>` being a pullable blob URL.
272246

247+
---
248+
249+
To push a blob monolithically by using a single POST request, perform a `POST` request to a URL in the following form, and with the following headers and body:
250+
251+
`/v2/<name>/blobs/uploads/?digest=<digest>` <sup>[end-4b](#endpoints)</sup>
252+
```
253+
Content-Length: <length>
254+
Content-Type: application/octet-stream
255+
```
256+
```
257+
<upload byte stream>
258+
```
259+
260+
Here, `<name>` is the repository's namespace, `<digest>` is the blob's digest, and `<length>` is the size (in bytes) of the blob.
261+
262+
The `Content-Length` header MUST match the blob's actual content length. Likewise, the `<digest>` MUST match the blob's digest.
263+
264+
Successful completion of the request MUST return either a `201 Created` or a `202 Accepted`, and MUST include the following header:
265+
266+
```
267+
Location: <blob-location>
268+
```
269+
270+
Here, `<blob-location>` is a pullable blob URL. This location does not necessarily have to be served by your register, for example, in the case of a signed URL from
271+
some cloud storage provider that your registry generates.
272+
273+
273274
##### Pushing a blob in chunks
274275

275276
A chunked blob upload is accomplished in three phases:

0 commit comments

Comments
 (0)