mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-02-02 21:27:15 +08:00
set default upload file parallel num as 20
This commit is contained in:
parent
797ac7bbe6
commit
779ebd532f
@ -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
|
||||
|
@ -38,6 +38,9 @@ const (
|
||||
ConfigName = "aliyunpan_config.json"
|
||||
// ConfigVersion 配置文件版本
|
||||
ConfigVersion string = "1.0"
|
||||
|
||||
// DefaultUploadParallelNum 默认的文件上传并发数量
|
||||
DefaultFileUploadParallelNum = 20
|
||||
)
|
||||
|
||||
var (
|
||||
|
Loading…
Reference in New Issue
Block a user