feat(uploader): concurrent chunk uploads
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user