set default upload file parallel num as 20

This commit is contained in:
xiaoyaofenfen 2022-01-07 17:13:02 +08:00
parent 797ac7bbe6
commit 779ebd532f
2 changed files with 6 additions and 0 deletions

View File

@ -256,6 +256,9 @@ func RunUpload(localPaths []string, savePath string, opt *UploadOptions) {
// 检测opt
if opt.AllParallel <= 0 {
opt.AllParallel = config.Config.MaxUploadParallel
if opt.AllParallel == 0 {
opt.AllParallel = config.DefaultFileUploadParallelNum
}
}
if opt.Parallel <= 0 {
opt.Parallel = 1

View File

@ -38,6 +38,9 @@ const (
ConfigName = "aliyunpan_config.json"
// ConfigVersion 配置文件版本
ConfigVersion string = "1.0"
// DefaultUploadParallelNum 默认的文件上传并发数量
DefaultFileUploadParallelNum = 20
)
var (