mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 16:48:30 +01:00
feat(quota): skip to save blob size when quota disabled
Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit is contained in:
parent
d8c2bf6f86
commit
3e515bfabb
@ -48,6 +48,10 @@ func (*blobStreamUploadBuilder) Build(req *http.Request) (interceptor.Intercepto
|
|||||||
uuid := s[2]
|
uuid := s[2]
|
||||||
|
|
||||||
onResponse := func(w http.ResponseWriter, req *http.Request) {
|
onResponse := func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
if !config.QuotaPerProjectEnable() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
size, err := parseUploadedBlobSize(w)
|
size, err := parseUploadedBlobSize(w)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("failed to parse uploaded blob size for upload %s, error: %v", uuid, err)
|
log.Errorf("failed to parse uploaded blob size for upload %s, error: %v", uuid, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user