feat(quota): skip to save blob size when quota disabled

Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit is contained in:
He Weiwei 2019-09-25 09:18:48 +00:00
parent d8c2bf6f86
commit 3e515bfabb

View File

@ -48,6 +48,10 @@ func (*blobStreamUploadBuilder) Build(req *http.Request) (interceptor.Intercepto
uuid := s[2]
onResponse := func(w http.ResponseWriter, req *http.Request) {
if !config.QuotaPerProjectEnable() {
return
}
size, err := parseUploadedBlobSize(w)
if err != nil {
log.Errorf("failed to parse uploaded blob size for upload %s, error: %v", uuid, err)