diff --git a/assets b/assets index d0540548..a095f8c6 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit d0540548cfb2caeec0c7d44e85819c833fdeda0f +Subproject commit a095f8c612562536c536f54be04ec84e500d5ca7 diff --git a/inventory/types/types.go b/inventory/types/types.go index bc069859..2306ac40 100644 --- a/inventory/types/types.go +++ b/inventory/types/types.go @@ -101,6 +101,8 @@ type ( SourceAuth bool `json:"source_auth,omitempty"` // QiniuUploadCdn whether to use CDN for Qiniu upload. QiniuUploadCdn bool `json:"qiniu_upload_cdn,omitempty"` + // ChunkConcurrency the number of chunks to upload concurrently. + ChunkConcurrency int `json:"chunk_concurrency,omitempty"` } FileType int diff --git a/service/explorer/response.go b/service/explorer/response.go index 302a2275..991039b9 100644 --- a/service/explorer/response.go +++ b/service/explorer/response.go @@ -259,6 +259,7 @@ type StoragePolicy struct { Type types.PolicyType `json:"type"` MaxSize int64 `json:"max_size"` Relay bool `json:"relay,omitempty"` + ChunkConcurrency int `json:"chunk_concurrency,omitempty"` } type Entity struct { @@ -452,11 +453,12 @@ func BuildStoragePolicy(sp *ent.StoragePolicy, hasher hashid.Encoder) *StoragePo } res := &StoragePolicy{ - ID: hashid.EncodePolicyID(hasher, sp.ID), - Name: sp.Name, - Type: types.PolicyType(sp.Type), - MaxSize: sp.MaxSize, - Relay: sp.Settings.Relay, + ID: hashid.EncodePolicyID(hasher, sp.ID), + Name: sp.Name, + Type: types.PolicyType(sp.Type), + MaxSize: sp.MaxSize, + Relay: sp.Settings.Relay, + ChunkConcurrency: sp.Settings.ChunkConcurrency, } if sp.Settings.IsFileTypeDenyList {