diff --git a/spec.md b/spec.md index 18046593..97cb43c6 100644 --- a/spec.md +++ b/spec.md @@ -353,7 +353,7 @@ Here, `` is a pullable blob URL. ##### Mounting a blob from another repository -If a necessary blob exists already in another repository, it can be mounted into a different repository via a `POST` +If a necessary blob exists already in another repository within the same registry, it can be mounted into a different repository via a `POST` request in the following format: `/v2//blobs/uploads/?mount=&from=` [end-11](#endpoints). @@ -372,6 +372,10 @@ The Location header will contain the registry URL to access the accepted layer f header returns the canonical digest of the uploaded blob which MAY differ from the provided digest. Most clients MAY ignore the value but if it is used, the client SHOULD verify the value against the uploaded blob data. +The registry MAY treat the `from` parameter as optional, and it MAY cross-mount the blob if it can be found. + +It MAY cross-mount the blob referred to by the `mount` parameter even if the `from` parameter is omitted. + Alternatively, if a registry does not support cross-repository mounting or is unable to mount the requested blob, it SHOULD return a `202`. This indicates that the upload session has begun and that the client MAY proceed with the upload.