forked from TrueCloudLab/distribution
Allow variadic url values for BuildBlobUploadURL
URL values may be required to complete an upload in a single POST request, which may include digest and size. This is not implemented in the server side, yet, but is part of the HTTP API specification.
This commit is contained in:
parent
d08f0edcf1
commit
bb300231d0
1 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ func (ub *URLBuilder) BuildBlobURL(name string, dgst digest.Digest) (string, err
|
|||
|
||||
// BuildBlobUploadURL constructs a url to begin a blob upload in the
|
||||
// repository identified by name.
|
||||
func (ub *URLBuilder) BuildBlobUploadURL(name string) (string, error) {
|
||||
func (ub *URLBuilder) BuildBlobUploadURL(name string, values ...url.Values) (string, error) {
|
||||
route := ub.cloneRoute(RouteNameBlobUpload)
|
||||
|
||||
uploadURL, err := route.URL("name", name)
|
||||
|
@ -109,7 +109,7 @@ func (ub *URLBuilder) BuildBlobUploadURL(name string) (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
return uploadURL.String(), nil
|
||||
return appendValuesURL(uploadURL, values...).String(), nil
|
||||
}
|
||||
|
||||
// BuildBlobUploadChunkURL constructs a url for the upload identified by uuid,
|
||||
|
|
Loading…
Reference in a new issue