working commit
This commit is contained in:
@@ -189,6 +189,30 @@ func (svc *Service) Build() error {
|
||||
|
||||
svc.rout.Patch(`/v2/{name}/blobs/uploads/{reference}`, svc.hand.PatchUpload)
|
||||
|
||||
// To close the session, issue a PUT request to a url in the following format,
|
||||
// and with the following headers (and optional body, depending on whether or not
|
||||
// the final chunk was uploaded already via a PATCH request):
|
||||
//
|
||||
// <location>?digest=<digest>
|
||||
//
|
||||
// Content-Length: <length of chunk, if present>
|
||||
// Content-Range: <range of chunk, if present>
|
||||
// Content-Type: application/octet-stream <if chunk provided>
|
||||
//
|
||||
// OPTIONAL: <final chunk byte stream>
|
||||
//
|
||||
// The closing PUT request MUST include the <digest> of the whole blob
|
||||
// (not the final chunk) as a query parameter.
|
||||
//
|
||||
// The response to a successful closing of the session MUST be 201 Created,
|
||||
// and MUST contain the following header:
|
||||
//
|
||||
// Location: <blob-location>
|
||||
//
|
||||
// Here, <blob-location> is a pullable blob URL.
|
||||
|
||||
svc.rout.Put(`/v2/{name}/uploads/{reference}`, svc.hand.PutUpload)
|
||||
|
||||
svc.rout.NotFound(svc.hand.NotFound)
|
||||
|
||||
selector := svc.rout.Selector()
|
||||
|
||||
Reference in New Issue
Block a user